flutter 配置开发运行环境检测
flutter doctor
Flutter应用程序
- 创建flutter app
- 运行flutter app
flutter create projectname ------projectname(项目名称)
cd projectname
flutter run
lib/main.dart自动生成默认文件
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Welcome to Flutter',
home: new Scaffold(
appBar: new AppBar(
title: new Text('Welcome to Flutter'),
),
body: new Center(
child: new Text('Hello World'),
),
),
);
}
}
这样初步的项目app就创建成功了。
本文暂时没有评论,来添加一个吧(●'◡'●)