How do I import the Dart IndexedDB library in Flutter?

Viewed 1030

I am using following statement to import dart indexed db library in Flutter application:

import 'dart:indexed_db';

VSCode reports following error:

Target of URI doesn't exist: 'dart:indexeddb'.
Try creating the file referenced by the URI, or Try using a URI for a file that does 
exist.dart(uri_does_not_exist)

How to use indexed db in Flutter?

1 Answers

According to this issue: indexedDB blocked

indexedDB is blocked in flutter

you could use an alternative like idb_shim which is simply a wrapper for indexedDB API

Related