59:18: 错误: 方法'isDuplicateColumnError'未为类"数据库异常"定义



我在flatter_cache_manager 2.1.0上遇到此错误消息,该消息不允许我执行应用程序以前有人经历过这个问题吗?

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_cache_manager-2.1.0/lib/src/storage/cache_info_repositories/cache_object_provider.dart:59:18: Error: The method 'isDuplicateColumnError' isn't defined for the class 'DatabaseException'.
- 'DatabaseException' is from 'package:sqflite/src/exception.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.7+2/lib/src/exception.dart').
Try correcting the name to the name of an existing method, or defining a method named 'isDuplicateColumnError'.

- 'DatabaseException' is from 'package:sqflite/src/exception.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.7+2/lib/src/exception.dart').
Try correcting the name to the name of an existing method, or defining a method named 'isDuplicateColumnError'.
if (!e.isDuplicateColumnError(CacheObject.columnLength)) rethrow;
^^^^^^^^^^^^^^^^^^^^^^

sqflite 1.1.7看起来已经过时了。你能试试flutter pub upgrade吗?

最新更新