Open thealteria opened 3 years ago
Me to...
Me to...
I use GetStorage().read()
before GetStorage.init()
OK so I guess I know why I faced it.
Basically I made different boxes/containers like GetStorage('box1')
and GetStorage('box2')
but was only initializing the GetStorage.init()
.
Now I'm using only single container with no container name and it's working fine.
I too keep getting this error in the console when I restart the app. Is anyone still looking at this issue?
It's been more than a year and this issue is still open
I was getting the error by doing:
await GetStorage.init();
final box = GetStorage('label');
But I resolved after changing to:
await GetStorage.init('label');
final box = GetStorage('label');
OK so I guess I know why I faced it. Basically I made different boxes/containers like
GetStorage('box1')
andGetStorage('box2')
but was only initializing theGetStorage.init()
. Now I'm using only single container with no container name and it's working fine.
Really thank you, it works :)
I solved it. The reason is that WidgetsFlutterBinding.ensureInitialized() is called in GetStorage.init(). If you also call WidgetsFlutterBinding.ensureInitialized() in the main function, this error will occur when the app restarts
Getting "Corrupted box, recovering backup file" error in log and not getting any saved values after upgrading getx.