I want to notify the wrapper when a value changes from null to a number, but the wrapper seems not to receive the change. Check my code below:
class setID with ChangeNotifier{
String studyID;
void setStudyID(String study){
studyID = study;
notifyListeners();
}
}
in main.dart,
return MultiProvider(
providers: [
ChangeNotifierProvider(create: (_) => setID()),
// others providers here
],
child: MaterialApp(
home: Wrapper(),
),
in wrapper.dart,
final studyID = Provider.of<setID>(context).studyID;
When the value is changed in setID class, no value is received in the wrapper. Could anyone help me out? Thank you in advance.