0x03.基础组件介绍-[Flutter]

本章将对Flutter的基础组件进行介绍。 根据组件的功能按以下进行分类。(资料整理过程中会逐步整理下面的列表)

  1. 显示组件
    • 文字(Text)
    • 富文本(RichText)
    • 图像(Image)
    • 图标(Icon)
    • 浮雕按钮(RaisedButton)
    • 扁平按钮(FlatButton)
    • 图标按钮(IconButton)
    • 文本框(TextField)
    • 复选框(Checkbox)
    • 单选框(Radio)
    • 开关(Switch)
    • 滑块(Slider)
    • 日期事件选择(Date & Time Pickers)
  2. 装饰组件
    • 透明(Opacity)
    • 变形(Transform)
    • DecoratedBox
    • FractionalTranslation
    • RotatedBox
    • ClipOval
    • ClipPath
    • ClipRect
    • CustomPaint
    • BackdropFilter
  3. 布局组件
    • Container
    • Padding
    • Center
    • Align
    • FittedBox
    • AspectRatio
    • ConstrainedBox
    • Baseline
    • FractionallySizedBox
    • IntrinsicHeight
    • IntrinsicWidth
    • LimitedBox
    • Offstage
    • OverflowBox
    • SizedBox
    • SizedOverflowBox
    • Transform
    • CustomSingleChildLayout
    • Row
    • Column
    • Stack
    • IndexedStack
    • GridView
    • Flow
    • Table
    • Wrap
    • ListBody
    • ListView
    • CustomMultiChildLayout
    • LayoutBuilder
  4. 对话框

如无特殊说明,所有的示例均从以下代码作为初始的脚手架。

import 'package:flutter/material.dart';

void main() => runApp(ExText());

class ExText extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "示例",
      home: Scaffold(
        appBar: AppBar(
          title: Text("文字示例"),
        ),
        body: ListView(
          children: <Widget>[
          ],
        ),
      ),
    );
  }
}

注:本章示例基于Dart2,因此new、const可省略。如使用Dart1,请升级到支持Dart2的版本,或自行添加new和const。