我创建了一个应用程序,我有几个try-catch。问题是,每当我打印出异常时,它只打印出异常的第一行。例如,当我删除所有try-catch并抛出异常时,它显示如下: E/flutter (15478): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Null check operator used on a null value
E/flutter (15478): #0 MyClass._insertIntoDB (package:test/util/my_class.dart:186:25)
当我尝试通过firestorage上传图片时,我遇到了一个问题。
upload的这个功能:
Future uploadFile() async {
int i = 1;
final String fileName = DateTime.now().toString();
for (var img in _image) {
setState(() {
val = i / _image.length;
});
FirebaseStorage storage = FirebaseStorage.instanc
我在我的代码中得到了未处理的异常,我的应用程序不工作。
这是我在日志中发现的唯一一个错误:
ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: type 'String' is not a subtype of type 'int' of 'index'
E/flutter (30126): #0 AssistantMethods.obtainPlaceDirectionDetails (package:driverapp/Assistant/assistantMet
在开发Flutter应用程序时,我遇到了一个问题,在两个看似相似的东西中,只有一个是真正有效的。另一个给出一个错误。
// this does NOT work
// gives error: E/flutter (13080): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception:
// type 'MaterialPageRoute<dynamic>' is not a subtype of type 'Route<String>?' in type ca