Closed tbm98 closed 4 years ago
Instead of the constructor, you should initialize your StateNotifier inside its "initState" method
I found initState in mixin LocatorMixin, but if I don't use LocatorMixin then where should I put initialize function to ?
If you don't use LocatorMixin
, then you don't have access to read
, therefore cannot have a DependencyNotFoundException
. So the constructor is fine.
Thanks!
But why you don't put LocatorMixin into StateNotifier by default ?
LocatorMixin is specific to provider/Flutter
StateNotifier isn't
On Fri, Jun 19, 2020, 04:30 tbm98 notifications@github.com wrote:
But why you don't put LocatorMixin into StateNotifier by default ?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/rrousselGit/state_notifier/issues/24#issuecomment-646415568, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZ3I3JP2JV4MVACTJVEBMTRXLLWJANCNFSM4OCJGPOQ .
Thanks
Vào 10:48 Th 6, 19 thg 6 2020 Remi Rousselet notifications@github.com đã viết:
LocatorMixin is specific to provider/Flutter
StateNotifier isn't
On Fri, Jun 19, 2020, 04:30 tbm98 notifications@github.com wrote:
But why you don't put LocatorMixin into StateNotifier by default ?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub < https://github.com/rrousselGit/state_notifier/issues/24#issuecomment-646415568 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AEZ3I3JP2JV4MVACTJVEBMTRXLLWJANCNFSM4OCJGPOQ
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rrousselGit/state_notifier/issues/24#issuecomment-646419483, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMRATJBGMDFEBCTYGAYTFVDRXLNYRANCNFSM4OCJGPOQ .
void main:
my PrefsSupport:
my state_notifier class