在VSCode中运行flutter程序时,出现以下错误:
lib/main.dart: Warning: Interpreting this as package URI, 'package:firstapp/main.dart'.
../../CONFIG_HOME/FSDK/packages/flutter/lib/src/material/animated_icons.dart:9:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui show Paint, Path, Canvas;
^
../../CONFIG_HOME/FSDK/packages/flutter/lib/src/material/animated_icons.dart:10:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
^
../../CONFIG_HOME/FSDK/packages/flutter/lib/src/material/app.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui;
启动方式不正确,使用code runner 运行的是VM中的dart文件,并不是当前文件,如果需要运行当前文件,使用F5运行