jonataslaw / get_storage

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

Error on Web Platform: localStorage.containsKey is not a function #138

Closed rifkiard closed 9 months ago

rifkiard commented 9 months ago

in package:get_storage/src/storage/html.dart on line 26, get_storage using localStorage.containsKey to check the existence of storage in the web browser's local storage, unfortunately, this method doesn't exist in the localStorage object, causing an error on the initialization process (await GetStorage.init()).

File:

https://github.com/jonataslaw/get_storage/blob/78a0360cbca020b545eed4f7bb83f6eb1a524ae7/lib/src/storage/html.dart#L27