Projects add and view -> online

This commit is contained in:
Sewmina
2022-03-19 02:45:43 +05:30
parent c2b5656eb3
commit f04e82c5ca
4 changed files with 159 additions and 23 deletions

View File

@@ -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);
}
}