I am getting an error when using changenotifierprovider in my flutter project.
Error:
'MyUser' doesn't conform to the bound 'ChangeNotifier?' of the type parameter 'T'. Try using a type that is or is a subclass of 'ChangeNotifier?'.
Class:
class SettingsForm extends StatefulWidget {
static Widget getWidget() {
return new Provider(
create: (_) => MyUser(uid: ''),
child: ChangeNotifierProvider( <-- here **ChangeNotifierProvider**
create: (BuildContext context) => MyUser(uid: ''),
builder: (_, _) => SettingsForm()),
)
);
}