I have this example ChangeNotifier
:
class ExmapleNotifier extends ChangeNotifier {
bool isDark = false;
toggleTheme() {
isDark = !isDark;
notifyListeners();
}
}
when I try to use it with a ValueListenableBuilder
, it throws an error that it's not a ValueListenable
, is there any way to combine them both?