Skip to content

lgq895767507/flutter_ui

Repository files navigation

start flutter

ui

对齐 widgets
  • MainAxisAlignment 和CrossAxisAlignment 类提供了很多控制对齐的常量.
调整 widget
  • Expanded widget具有一个flex属性,它是一个整数,用于确定widget的弹性系数,默认弹性系数是1。
聚集 widgets
  • mainAxisSize: MainAxisSize.min

常用布局widgets

  • Container
  • GridView
  • ListView
  • Stack
  • Card
  • ListTile

second day

widget基础

  • row,column 设计基于flexbox布局模型
  • stack 线性布局
  • container 创建矩阵视觉元素

flutter构建布局

  • flutter中布局核心就是widget,几乎所有的东西都是一个widget

  • Container也是一个widget,允许您自定义其子widget

  • 如果要添加填充,边距,边框或背景色,请使用Container来设置(译者语:只有容器有这些属性)

  • 所有布局widget都有一个child属性(例如Center或Container),或者一个 children属性

  • 拆分布局,自下而上实现

first day

  • create myapp.dart,then run it.

2018.5.23

flutter_app

A new Flutter application.

Getting Started

For help getting started with Flutter, view our online documentation.

About

Building Layouts in Flutter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages