Want to access all of our courses? (36 h 00 min)
You also get:
Already a member? Login here
Not sure why but i was required to make some changes to save categories signature : I had to pass the BuildContext as variable : Future saveCategory(BuildContext context)
And then under onPressed of save button, i needed to pass context:
onPressed: () =>saveCategory(context)
Otherwise _formKey.currentState was always null
Not sure why but i was required to make some changes to save categories signature : I had to pass the BuildContext as variable : Future saveCategory(BuildContext context)
And then under onPressed of save button, i needed to pass context:
onPressed: () =>saveCategory(context)
Otherwise _formKey.currentState was always null