flutter - 如何在 Flutter 中导入 Dart IndexedDB 库?

标签 flutter dart indexeddb

我正在使用以下语句在 Flutter 应用程序中导入 dart 索引数据库库:

import 'dart:indexed_db';

VSCode 报告以下错误:

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)

如何在 Flutter 中使用索引数据库?

最佳答案

根据这个问题:indexedDB blocked

indexedDB 在 flutter 中被阻塞

您可以使用类似 idb_shim 的替代方法这只是 indexedDB API 的包装器

关于flutter - 如何在 Flutter 中导入 Dart IndexedDB 库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67490597/

相关文章:

api - 未处理的异常:错误状态:无法设置内容类型为 “application/json”的请求的正文字段

flutter - 当我按后退按钮或移除键盘时,文本字段中的文本消失

flutter - Flutter 中带有溢出文本的 FlatButton.icon

javascript - 使用db.js查询IndexedDB时如何获取key和value?

indexeddb - `IDBOpenDBRequest` "error"事件在哪里冒泡?

flutter - 如何在 flutter 中使用 DateFormat 选择出生日期?

flutter - 根据 Flutter 中的内容调整 Card 高度

dart - Flutter - InputDecoration 边框仅在聚焦时

flutter - 为什么在 dart/flutter 中序列化 JSON 时 build_runner 不生成文件

javascript - IndexedDB IDBObjectStore.add 错误 : "a generated key could not be inserted into the value"