flutter运行说明
flutter前端项目库的调用操作,就从0开始呗。
其实这个框架还有dart语言都还挺不错的,有时间可以细细的学一下。这种一次性可以开发多个客户端的语言也该还是有很大前景的。
Install Flutter
unzip 'the position of package'
- export PATH=
pwd
/flutter/bin:$PATH flutter doctor
Build
- Clone repo
git clone https://github.com/projectName/projectName.git
- Run
flutter pub get
to install dependencies - Run
flutter pub run build_runner watch
to generate code - Run
flutter run
For Flutter newbie
A few resources to get you started if this is your first Flutter project:
Lab: Write your first Flutter app
Cookbook: Useful Flutter samples
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Some shitty information
Everything in Flutter is a widget.
主页储存在\lib\main.dart
里,语料卡片在\lib\compoents\ExtentGrid.dart
里
目前对于页面在手机上的想法是,通过获得设备屏幕的宽度,依照宽度来决定首页的布局,假如屏幕宽度大于500px就使用默认的布局方式,假如小于500px就去掉两边的留白,直接把语料卡片的大小设置为屏幕的大小。
通过对已经写过的代码的分析,dart可以使用if, else if, else
语句