Debugging 无颤振框架堆叠痕迹
我过去常常看到颤振框架抛出错误时的完整堆栈跟踪。但是,自最近发布以来,除了下面的消息外,没有显示堆栈轨迹 完整代码Debugging 无颤振框架堆叠痕迹,debugging,flutter,Debugging,Flutter,我过去常常看到颤振框架抛出错误时的完整堆栈跟踪。但是,自最近发布以来,除了下面的消息外,没有显示堆栈轨迹 完整代码 import 'package:flutter/material.dart'; class BtnApp extends StatelessWidget { final String title; BtnApp([this.title]); @override Widget build(BuildContext context) { if (title
import 'package:flutter/material.dart';
class BtnApp extends StatelessWidget {
final String title;
BtnApp([this.title]);
@override
Widget build(BuildContext context) {
if (title.substring(0, 1) == '/') {
print('start with /');
} else {
print('other');
}
return new Container();
}
}
main() {
runApp(new BtnApp());
}
输出
Launching lib/tinker/btnapp.dart on iPhone 7 in debug mode...
Running pod install...
Running Xcode build...
Syncing files to device iPhone 7...
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞════════
The method 'substring' was called on null.
Receiver: null
When the exception was thrown, this was the stack:
════════════════════════════════════════════════════════
这里没有堆栈跟踪
我在iOS上没有堆栈跟踪。不过我是在安卓系统上得到的。@DragonFax是的,没错。我现在才知道。