Open phymo opened 5 years ago
找到 sdk/emulator.exe, 复制路径
~\emulator.exe -netdelay none -netspeed full -avd Nexus_5x_API_28
保存为.bat 批处理文件 打开.bat 文件可以打开虚拟机
配置vs code
ctrl +~ 打开终端
flutter run
打开热更新
如果遇到下面错误,可以把os 从Q 降到pie
import 'material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget{ @override widget build(BuildContext context) { return MaterialApp{ title: 'hello dart', home: Scaffold( //页面主要文件 appBar: AppBar( .... ) } } }
(更简单的方法不用创建.bat 文件)点一下右下角 No Device , 选择虚拟机或者创建虚拟机(创建虚拟机需要 AVD system image, 可以通过Android studio 安装,也可以通过sdk manager 直接安装)
Android studio => tools => add device => add os
hero widget
dismissible
valueListenBuilder
valueNotifier
flutter doctor
检查运行环境