Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter: API #205

Open
2 tasks done
Tracked by #206
hhstore opened this issue Aug 15, 2020 · 7 comments
Open
2 tasks done
Tracked by #206

Flutter: API #205

hhstore opened this issue Aug 15, 2020 · 7 comments

Comments

@hhstore
Copy link
Owner

hhstore commented Aug 15, 2020

related:

@hhstore
Copy link
Owner Author

hhstore commented Aug 15, 2020

flutter API:

  • 万物皆为widgets .

1. UI 层:

1.1 widgets:

标准 widgets

  • Container:向 widget 增加 padding、margins、borders、background color 或者其他的“装饰”。
  • GridView:将 widget 展示为一个可滚动的网格。
  • ListView:将 widget 展示为一个可滚动的列表。
  • Stack:将 widget 覆盖在另一个的上面。

Material widgets

  • Card:将相关信息整理到一个有圆角和阴影的盒子中。
  • ListTile:将最多三行的文本、可选的导语以及后面的图标组织在一行中。

1.2 UI 布局:

创建布局:

布局原则:

原则:

  • 首先,上层 widget 向下层 widget 传递约束条件
  • 然后,下层 widget 向上层 widget 传递大小信息
  • 最后,上层 widget 决定下层 widget 的位置

1.3 添加资源和图片:

1.4 路由和导航:

@hhstore
Copy link
Owner Author

hhstore commented Aug 15, 2020

@hhstore
Copy link
Owner Author

hhstore commented Aug 15, 2020

@hhstore
Copy link
Owner Author

hhstore commented Aug 15, 2020

1

2 similar comments
@hhstore
Copy link
Owner Author

hhstore commented Aug 15, 2020

1

@hhstore
Copy link
Owner Author

hhstore commented Aug 15, 2020

1

@hhstore
Copy link
Owner Author

hhstore commented Aug 15, 2020

xxxxxx:

xxxxxxxxxxxxxx xxxxxxxxxxxxxx xxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant