flutter_localstorage icon indicating copy to clipboard operation
flutter_localstorage copied to clipboard

Does this package work for web?

Open saikiran2907 opened this issue 2 years ago • 3 comments

I was trying to use this package for web, but it is not working. So does it work for web application?

saikiran2907 avatar Jun 30 '22 06:06 saikiran2907

Same, its not working in web. Once the browser is close, the stored data never gets back.

nabinsah703 avatar Jul 31 '22 15:07 nabinsah703

Any update ?

ugurberkecan avatar Aug 19 '22 08:08 ugurberkecan

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

jardon-u avatar Aug 25 '22 08:08 jardon-u

yes, this package works for web. Please upgrade to the latest version.

lesnitsky avatar Apr 01 '24 18:04 lesnitsky