jonataslaw / get_storage

A fast, extra light and synchronous key-value storage to Get framework
MIT License
359 stars 82 forks source link

[Bug?] Unhandled Exception: FormatException: Unexpected character (at character 3) #58

Open Abacaxi-Nelson opened 3 years ago

Abacaxi-Nelson commented 3 years ago

Hey,

Sometimes, im having a : Unhandled Exception: FormatException: Unexpected character (at character 3) It append mainly (but not always) when first write is triggered:

GetStorage().write('tabs', _tabController.index);
flutter: GetStorage _init _initialData = null
[VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: FormatException: Unexpected character (at character 3)
{}tabs":2}
  ^
#0      GetStorage._init
package:get_storage/src/storage_impl.dart:48
<asynchronous suspension>
#1      new GetStorage._internal.<anonymous closure>
package:get_storage/src/storage_impl.dart:27
#2      new Future.<anonymous closure> (dart:async/future.dart:175:37)
#3      _rootRun (dart:async/zone.dart:1182:47)
#4      _CustomZone.run (dart:async/zone.dart:1093:19)
#5      _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#6      _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#7      _rootRun (dart:async/zone.dart:1190:13)
#8      _CustomZone.run (dart:async/zone.dart:1093:19)
#9      _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1021:23)
#10     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
#11     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:397:19)
#12     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:428:5)
#13     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

Dont understand the {}tabs":2} come from; im trying to write tabs:2 there is a } which replace the first "

Do you face same issue ? Thank you, and great work

jorelkimcruz commented 2 years ago

I also get the same error. have you fix this?