flutter_localstorage
flutter_localstorage copied to clipboard
Does this package work for web?
I was trying to use this package for web, but it is not working. So does it work for web application?
Same, its not working in web. Once the browser is close, the stored data never gets back.
Any update ?
I get this Exception throwing on Web when using setItem on a int setItem("currentColor", color.value)
"Error: NoSuchMethodError: 'toJson'
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49 throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 735:3 defaultNoSuchMethod
dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 61:17 noSuchMethod
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 730:31 noSuchMethod
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 392:12 callMethod
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 402:5 dsend
packages/localstorage/localstorage.dart 74:22 setItem
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5 _async
packages/localstorage/localstorage.dart 66:23 setItem
• Flutter version 3.3.0-0.4.pre on channel beta at /media/data/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3c0bee85b8 (5 days ago), 2022-08-19 14:58:10 -0700
• Engine revision ad3d868e0d
• Dart version 2.18.0 (build 2.18.0-271.7.beta)
• DevTools version 2.15.0
localstorage: ^4.0.0+1
yes, this package works for web. Please upgrade to the latest version.