flutter运行说明

flutter运行说明

flutter前端项目库的调用操作,就从0开始呗。
其实这个框架还有dart语言都还挺不错的,有时间可以细细的学一下。这种一次性可以开发多个客户端的语言也该还是有很大前景的。

Install Flutter

  1. unzip 'the position of package'
  2. export PATH=pwd/flutter/bin:$PATH
  3. flutter doctor

Build

  1. Clone repo git clone https://github.com/projectName/projectName.git
  2. Run flutter pub get to install dependencies
  3. Run flutter pub run build_runner watch to generate code
  4. 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语句


References

Dart Cheat Sheet

作者

Felix Chen

发布于

2021-08-03

更新于

2021-08-11

许可协议

评论