This is rout file and this code is rout of EditProfilePage
This image is EditProfilePage, This code is required things and facing the error because of this.
I expecting the solution of this related error in flutter technology.
This is rout file and this code is rout of EditProfilePage
This image is EditProfilePage, This code is required things and facing the error because of this.
I expecting the solution of this related error in flutter technology.
2
Answers
You need to pass a UserProfile instance on
userProfile
and theonUpdate
is a callback method which return a UserProfile.So while creating
EditProfilePage
it will be likeYou have to watch out for the types
An empty String is not a valid default value for a callback or an Object
You can create default values for your classes, for example:
Now if you have to use a UserProfile defaultValue
For your last comment in the previous answer, did you forget to pass
(value) {}
instead of''
in the fieldonUpdate
?