Lesson 24/34 · 13:01 min
Repository link for this lesson
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