- 概述
- lib/dart/summary.dart
- 数据类型(num, int, double, bool, String, List, Set, Map, Object, dynamic, 数据类型转换与判断,可空类型)
- lib/dart/datatype.dart
- 运算符
- lib/dart/operator.dart
- 控制语句(if/else, switch/case, while/do-while, for)
- lib/dart/statement.dart
- 错误处理(assert, try/on/catch/finally)
- lib/dart/exception.dart
- 函数(函数基础,箭头函数,可选参数,命名参数,函数作为参数,匿名函数,嵌套函数,闭包函数,回调函数)
- lib/dart/function.dart
- 类(类基础,构造函数,枚举)
- lib/dart/class1.dart
- 类(抽象类,接口,继承,混入,扩展方法)
- lib/dart/class2.dart
- 泛型(泛型类,泛型属性,泛型方法,泛型扩展方法)
- lib/dart/generic.dart
- 单线程异步编程(async/await/Future/Stream/StreamSubscription/Completer/Timer)
- lib/dart/async.dart
- 多线程异步编程(isolate/compute)
- lib/dart/isolate.dart
- 库的开发和使用
- lib/dart/package/demo.dart
- lib/dart/package/lib1.dart
- lib/dart/package/lib2.dart
- lib/dart/package/lib3.dart
- lib/dart/package/lib4.dart
- lib/dart/package/lib5.dart
- lib/dart/package/lib6.dart
- lib/dart/package/lib7.dart
- lib/dart/package/lib8.dart
- lib/dart/package/lib9.dart
- lib/dart/package/lib10.dart
- lib/dart/package/lib11.dart
- lib/dart/package/mylib.dart
- lib/dart/package/mylib2.dart
- lib/dart/package/mylib3.dart
- 其它(用调用函数的方式调用类的实例,生成器)
- lib/dart/other.dart
- dart 3 新特性(元组,解构,switch 的模式匹配)
- lib/dart/dart3feature1.dart
- dart 3 新特性(类相关)
- lib/dart/dart3feature2.dart
- StatelessWidget - 无状态 widget
- lib/widget/basic/stateless_widget.dart
- StatefulWidget - 有状态 widget
- lib/widget/basic/stateful_widget.dart
- constraint - 约束
- lib/widget/basic/constraint.dart
- 焦点
- lib/widget/basic/focus.dart
- 三棵树
- lib/widget/basic/tree.dart
- 生命周期
- lib/widget/basic/lifecycle.dart
- Key - 键
- lib/widget/basic/key.dart
- Row - 水平弹性布局
- lib/widget/layout/row.dart
- Column - 垂直弹性布局
- lib/widget/layout/column.dart
- Flex - 水平弹性布局或垂直弹性布局
- lib/widget/layout/flex.dart
- Wrap - 可换行的水平布局,可换列的垂直布局
- lib/widget/layout/wrap.dart
- Flow - 自定义流式布局
- lib/widget/layout/flow.dart
- Stack - 层叠布局
- lib/widget/layout/stack.dart
- IndexedStack - 从多个子中选择一个显示
- lib/widget/layout/indexed_stack.dart
- CustomMultiChildLayout - 自定义多组件布局
- lib/widget/layout/custom_multi_child_layout.dart
- Align - 对齐方式
- lib/widget/container/align.dart
- Center - 居中对齐
- lib/widget/container/center.dart
- Padding - 内边距
- lib/widget/container/padding.dart
- ConstrainedBox - 约束范围
- lib/widget/container/constrained_box.dart
- SizedBox - 确定宽高
- lib/widget/container/sized_box.dart
- UnconstrainedBox - 无约束
- lib/widget/container/unconstrained_box.dart
- DecoratedBox - 装饰(用于绘制背景,边框,渐变,阴影,矩形或圆形等效果)
- lib/widget/container/decorated_box.dart
- Container - 综合容器(综合了各种效果的容器)
- lib/widget/container/container.dart
- Opacity - 不透明度
- lib/widget/container/opacity.dart
- LimitedBox - 限制最大尺寸
- lib/widget/container/limited_box.dart
- OverflowBox - 可溢出
- lib/widget/container/overflow_box.dart
- FittedBox - 自适应
- lib/widget/container/fitted_box.dart
- AspectRatio - 宽高比
- lib/widget/container/aspect_ratio.dart
- RotatedBox - 旋转
- lib/widget/container/rotated_box.dart
- Material - Material 组件
- lib/widget/container/material.dart
- InteractiveViewer - 手动拖动/手动缩放
- lib/widget/container/interactive_viewer.dart
- FractionallySizedBox - 按比值占用可用空间
- lib/widget/container/fractionally_sized_box.dart
- Card - 阴影边框
- lib/widget/container/card.dart
- CustomSingleChildLayout - 自定义单组件布局
- lib/widget/container/custom_single_child_layout.dart
- Text - 文本显示框
- lib/widget/text/text.dart
- 字体
- lib/widget/text/font.dart
- TextField - 文本输入框
- lib/widget/text/text_field.dart
- RichText - 富文本
- lib/widget/text/rich_text.dart
- Tooltip - 长按提示或鼠标悬浮提示
- lib/widget/text/tooltip.dart
- Form - 表单
- lib/widget/text/form.dart
- Autocomplete - 自动完成
- lib/widget/text/autocomplete.dart
- TextButton - 文本按钮
- lib/widget/button/text_button.dart
- OutlinedButton - 自带边框按钮
- lib/widget/button/outlined_button.dart
- ElevatedButton - 自带背景色按钮
- lib/widget/button/elevated_button.dart
- IconButton - 图标按钮
- lib/widget/button/icon_button.dart
- Ink/InkWell/InkResponse - 让任意组件支持点击事件和点击效果
- lib/widget/button/ink.dart
- Chip - Chip(背景上有文字,文字左边有图标,文字右边有删除按钮)
- lib/widget/chip/chip.dart
- ActionChip - Chip 按钮
- lib/widget/chip/action_chip.dart
- ChoiceChip - Chip 双状态按钮
- lib/widget/chip/choice_chip.dart
- FilterChip - Chip 双状态按钮(选中时有对钩)
- lib/widget/chip/filter_chip.dart
- InputChip - Chip 双状态按钮(选中时有对钩,文字右边有删除按钮)
- lib/widget/chip/input_chip.dart
- Image - 图片
- lib/widget/media/image.dart
- Icon - 图标
- lib/widget/media/icon.dart
- Divider - 分隔线
- lib/widget/media/divider.dart
- CircleAvatar - 圆形头像
- lib/widget/media/circle_avatar.dart
- RawImage - 用于显示 dart:ui 库中的 Image
- lib/widget/media/raw_image.dart
- Scaffold - 脚手架
- lib/widget/structure/scaffold.dart
- Scaffold 的 AppBar - 顶部导航栏
- lib/widget/structure/scaffold_app_bar.dart
- Scaffold 的 BottomNavigationBar - 底部导航栏
- lib/widget/structure/scaffold_bottom_navigation_bar.dart
- Scaffold 的 Drawer - 侧滑菜单(左侧抽屉/右侧抽屉)
- lib/widget/structure/scaffold_drawer.dart
- Scaffold 的 FloatingActionButton - 悬浮按钮
- lib/widget/structure/scaffold_floating_action_button.dart
- Scaffold 的 TabBar - 选项卡(基础)
- lib/widget/structure/scaffold_tab_bar.dart
- Scaffold 的 TabBar - 选项卡(自定义 TabController,通过程序切换选项卡,以及如何保持每个 Tab 对应的内容的状态)
- lib/widget/structure/scaffold_tab_bar2.dart
- MaterialApp - 符合 Material Design 的根组件
- lib/widget/structure/material_app.dart
- BottomSheet - 底部弹出框
- lib/widget/structure/scaffold_bottom_sheet.dart
- AlertDialog - 弹出框(包括标题,内容,多个按钮)
- lib/widget/flyout/alert_dialog.dart
- SimpleDialog - 弹出框(包括标题,多个选项)
- lib/widget/flyout/simple_dialog.dart
- SnackBar - 底部弹出条
- lib/widget/flyout/snack_bar.dart
- MaterialBanner - 顶部弹出条
- lib/widget/flyout/material_banner.dart
- PopupMenuButton - 弹出菜单按钮
- lib/widget/flyout/popup_menu_button.dart
- Radio - 单选框
- lib/widget/selection/radio.dart
- Checkbox - 复选框
- lib/widget/selection/checkbox.dart
- DropdownButton - 下拉框
- lib/widget/selection/dropdown_button.dart
- Switch - 开关
- lib/widget/selection/switch.dart
- ToggleButtons - 一组多状态按钮
- lib/widget/selection/toggle_buttons.dart
- showDatePicker()/showTimePicker/CalendarDatePicker - 日期选择和时间选择
- lib/widget/selection/time_picker.dart
- Stepper - 步骤选择
- lib/widget/selection/stepper.dart
- CircularProgressIndicator - 圆形进度条
- lib/widget/progress/circular_progress_indicator.dart
- LinearProgressIndicator - 条形进度条
- lib/widget/progress/linear_progress_indicator.dart
- RefreshIndicator - 下拉刷新进度条
- lib/widget/progress/refresh_indicator.dart
- Slider - 可拖动进度条
- lib/widget/progress/slider.dart
- SingleChildScrollView, Scrollbar - 可滚动组件,滚动条
- lib/widget/scroll/single_child_scroll_view.dart
- ScrollController - 用于控制可滚动组件和滚动条
- lib/widget/scroll/scroll_controller.dart
- ScrollNotification - 滚动通知
- lib/widget/scroll/scroll_notification.dart
- DraggableScrollableSheet - 可滚动组件,并且支持通过拖拽的方式上下展开
- lib/widget/scroll/draggable_scrollable_sheet.dart
- PageView - 页面滚动切换
- lib/widget/scroll/page_view.dart
- ListView - 列表(基础)
- lib/widget/list/list_view.dart
- ListView - 列表(动态生成)
- lib/widget/list/list_view2.dart
- ListView - 列表(下拉刷新和上拉加载)
- lib/widget/list/list_view3.dart
- ListTile - 列表项
- lib/widget/list/list_tile.dart
- ExpansionTile - 列表项(可展开)
- lib/widget/list/expansion_tile.dart
- GridView - 网格
- lib/widget/list/grid_view.dart
- Table - 表格
- lib/widget/list/table.dart
- ReorderableListView - 可拖拽排序的列表
- lib/widget/list/reorderable_list_view.dart
- ExpansionPanelList - 可展开列表
- lib/widget/list/expansion_panel_list.dart
- Dismissible - 滑动删除
- lib/widget/list/dismissible.dart
- DataTable - 数据表格
- lib/widget/list/data_table.dart
- CustomScrollView/SliverPadding/SliverSafeArea - 通过 slivers 实现滚动效果
- lib/widget/sliver/custom_scroll_view.dart
- SliverList, SliverFixedExtentList - 列表(需要在 CustomScrollView 中使用)
- lib/widget/sliver/sliver_list.dart
- SliverGrid - 网格(需要在 CustomScrollView 中使用)
- lib/widget/sliver/sliver_grid.dart
- SliverAppBar/FlexibleSpaceBar - 可展开/收缩的标题栏(需要在 CustomScrollView 中使用)
- lib/widget/sliver/sliver_app_bar.dart
- SliverToBoxAdapter - 为不可滚动组件提供 sliver 效果
- lib/widget/sliver/sliver_to_box_adapter.dart
- NestedScrollView - 为可滚动组件提供 sliver 效果
- lib/widget/sliver/nested_scroll_view.dart
- SliverPersistentHeader - 自定义可展开/收缩的标题栏
- lib/widget/sliver/sliver_persistent_header.dart
- Builder - 在指定的位置构造上下文
- lib/widget/builder/builder.dart
- StatefulBuilder - 有状态的 Builder
- lib/widget/builder/stateful_builder.dart
- LayoutBuilder - 可以拿到父亲的尺寸的 Builder
- lib/widget/builder/layout_builder.dart
- FutureBuilder - 跟踪 Future 的变化并构造 Widget
- lib/widget/builder/future_builder.dart
- StreamBuilder - 跟踪 Stream 的变化并构造 Widget
- lib/widget/builder/stream_builder.dart
- 通过 SingleChildRenderObjectWidget 实现自定义组件
- lib/widget/custom/single_child_render_object_widget.dart
- 通过 CustomPaint 实现自定义组件
- lib/widget/custom/custom_paint.dart
- 通过组合多个 Widget 的方式实现自定义组件
- lib/widget/custom/custom_widget.dart
- 状态管理 - ChangeNotifier(多 Widget 之间的多数据的状态管理)
- lib/state/change_notifier.dart
- 状态管理 - ValueNotifier(多 Widget 之间的单值的状态管理)
- lib/state/value_notifier.dart
- 状态管理 - InheritedWidget(在树上,父共享数据后,任意子可获取此数据)
- lib/state/inherited_widget.dart
- 状态管理 - 在树上,子获取父的数据
- lib/state/find_ancestor.dart
- 状态管理 - 在树上,父监听子的通知
- lib/state/notification_listener.dart
- 状态管理 - 自定义 controller
- lib/state/controller.dart
- 状态管理 - Redux
- lib/state/redux.dart
- Listener - 指针
- lib/input/listener.dart
- GestureDetector - 手势
- lib/input/gesture_detector.dart
- RawKeyboardListener - 按键
- lib/input/raw_keyboard_listener.dart
- Draggable/DragTarget - 拖拽
- lib/input/drag.dart
- 软键盘相关
- lib/input/soft_keyboard.dart
- 命中测试(hit test)
- lib/input/hit_test.dart
- 路由和导航的基础
- lib/route/navigator.dart
- lib/route/route1.dart
- lib/route/route2.dart
- lib/route/route3.dart
- 路由和导航的进阶
- lib/route/navigator2.dart
- lib/route/route_a.dart
- lib/route/route_b.dart
- lib/route/route_c.dart
- lib/route/route_d.dart
- PageRouteBuilder - 路由跳转动画
- lib/route/page_route_builder.dart
- PageRouteBuilder - 路由跳转动画(让 pushNamed() 实现转场动画)
- lib/route/page_route_builder2.dart
- WillPopScope - 出栈拦截
- lib/route/will_pop_scope.dart
- 状态栏
- lib/ui/status_bar.dart
- android 底部导航栏
- lib/ui/navigation_bar.dart
- 主题(基础)
- lib/ui/theme.dart
- 主题(Material Design 3 规范,亮色主题,暗色主题)
- lib/ui/theme2.dart
- 屏幕方向
- lib/ui/orientation.dart
- 安全区域
- lib/ui/safe_area.dart
- 闪屏页,程序名称,程序图标
- lib/ui/splash_screen.dart
- 其它
- lib/ui/other.dart
- MediaQuery - 获取屏幕的相关信息,使系统设置中的字体大小无效
- lib/ui/media_query.dart
- 边框
- lib/shape/border.dart
- 剪裁
- lib/shape/clip.dart
- 渐变
- lib/shape/gradient.dart
- 变换
- lib/shape/transform.dart
- 阴影
- lib/shape/shadow.dart
- 绘制
- lib/shape/paint.dart
- Animation - 动画基础(以直线型动画为例)
- lib/animation/animation.dart
- CurvedAnimation - 曲线型动画(缓动动画)
- lib/animation/curved_animation.dart
- Tween - 补间动画(直线型动画)
- lib/animation/tween.dart
- Tween - 补间动画(曲线型动画)
- lib/animation/tween2.dart
- 自定义 Tween - ColorTween, CurveTween, SizeTween, RectTween, AlignmentTween, BorderTween, BoxConstraintsTween, DecorationTween, EdgeInsetsTween, TextStyleTween, IntTween 等
- lib/animation/tween3.dart
- XxxTransition - 支持直接关联 Animation 并自动重绘的 Widget(FadeTransition, SizeTransition, SlideTransition, AlignTransition, DecoratedBoxTransition, DefaultTextStyleTransition, PositionedTransition, RotationTransition, ScaleTransition 等)
- lib/animation/transition.dart
- AnimatedWidget - 用于实现自定义的 Transition
- lib/animation/animated_widget.dart
- AnimatedBuilder - 用于简化 AnimatedWidget 动画
- lib/animation/animated_builder.dart
- AnimatedXxx - 极简动画 Widget(AnimatedContainer, AnimatedDefaultTextStyle, AnimatedOpacity, AnimatedPadding, AnimatedPositioned, AnimatedRotation, AnimatedScale, AnimatedSize, AnimatedSlide 等)
- lib/animation/animated.dart
- Hero - 一个对象从一个页飞入另一个页的动画
- lib/animation/hero.dart
- Stagger - 复合动画,即一个 AnimationController 控制多个动画
- lib/animation/stagger.dart
- shared_preferences - 用于操作 android 的 SharedPreferences, ios 的 NSUserDefaults, web 的 LocalStorage
- lib/storage/shared_preferences.dart
- path_provider - 用于获取不同平台的本地存储的路径
- lib/storage/path_provider.dart
- File, Directory - 文件操作, 目录操作
- lib/storage/file.dart
- Localization - 国际化
- lib/resource/localization.dart
- rootBundle - 访问程序内资源
- lib/resource/root_bundle.dart
- http 库以及 json 和对象间的转换
- lib/network/http.dart
- flutter 与 android 原生之间的数据通信
- lib/plugin/plugin.dart
- android/app/src/main/kotlin/com/example/flutter_demo/MainActivity.kt
- android/app/src/main/kotlin/com/example/flutter_demo/MyFlutterPlugin1.kt
- flutter 与 ios 原生之间的数据通信
- lib/plugin/plugin.dart
- ios/Runner/AppDelegate.swift
- ios/Runner/MyFlutterPlugin1.swift
- flutter 使用 android 原生控件,并做数据通信
- lib/plugin/plugin2.dart
- android/app/src/main/kotlin/com/example/flutter_demo/MainActivity.kt
- android/app/src/main/kotlin/com/example/flutter_demo/MyFlutterPlugin2.kt
- android/app/src/main/kotlin/com/example/flutter_demo/MyView.kt
- android/app/src/main/res/layout/view_my.xml
- flutter 使用 ios 原生控件,并做数据通信
- lib/plugin/plugin2.dart
- ios/Runner/AppDelegate.swift
- ios/Runner/MyFlutterPlugin2.swift
- ios/Runner/MyView.swift
- flutter 与 web 原生之间的数据通信
- lib/plugin/plugin.dart
- lib/plugin/flutter_plugin_web.dart
- web/index.html
- flutter 使用 web 原生控件,并做数据通信
- lib/plugin/plugin2.dart
- lib/plugin/flutter_plugin_web2_stub.dart
- lib/plugin/flutter_plugin_web2.dart
- 俄罗斯方块
- lib/game/tetris/tetris.dart
- lib/game/tetris/core.dart
- lib/game/tetris/config.dart
- lib/game/tetris/controller.dart
- lib/game/tetris/shape/square.dart
- lib/game/tetris/shape/shape.dart
- lib/game/tetris/shape/i.dart
- lib/game/tetris/shape/l.dart
- lib/game/tetris/shape/l2.dart
- lib/game/tetris/shape/n.dart
- lib/game/tetris/shape/n2.dart
- lib/game/tetris/shape/o.dart
- lib/game/tetris/shape/t.dart