Projects add and view -> online
This commit is contained in:
@@ -481,7 +481,9 @@ class _NewProject2State extends State<NewProject2> {
|
||||
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 0),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(primary: Colors.green, shape: StadiumBorder()),
|
||||
onPressed: () {},
|
||||
onPressed: () {
|
||||
OnClickAdd();
|
||||
},
|
||||
child: Text('Next', style: TextStyle(fontSize: 20))))),
|
||||
],
|
||||
))
|
||||
@@ -662,6 +664,7 @@ class _NewProject2State extends State<NewProject2> {
|
||||
void OnClickAdd() async{
|
||||
if(projectName==null || deadline.isBefore(DateTime.now())){showAlertDialog(context, 'Error', 'Please make sure you have entered correct information'); return;}
|
||||
|
||||
User.UserOperations.addProject(projectName!, selectedCat, steps, deadline);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user