flutter中的BottomSheet底部菜单列表
showModalBottomSheet方法可以弹出一个Material风格的底部菜单列表模态对话框,示例如下:// 弹出底部菜单列表模态对话框Future<int> _show...
showModalBottomSheet方法可以弹出一个Material风格的底部菜单列表模态对话框,示例如下:// 弹出底部菜单列表模态对话框Future<int> _show...
AlertDialogconst AlertDialog({ Key key, this.title, //对话框标题组件 this.titlePadding, // 标题填充 this.titleTextStyle, /...
showTimePicker 参数Future<TimeOfDay> showTimePicker({ @required BuildContext context, @required TimeOfDay initialTime, Tran...
showDatePicker参数Future<DateTime> showDatePicker ({ @required BuildContext context, // 上下文 @required DateTime initialDate,...
Slider滑动选择器参数const Slider({ Key key, @required this.value,//默认值 @required this.onChanged,//滑动回调函数 this.onC...
Switch参数const Switch({ Key key, @required this.value,//true:开 false:关 @required this.onChanged,//变化时回调 this.act...
Radio参数const Radio({ Key key, @required this.value,//每个单选按钮的值,每个值是唯一的,不可重复 @required this.groupValue,...
CheckBox参数const Checkbox({ Key key, @required this.value,//是否选中此复选框 this.tristate = false,//默认false,如果为t...
PopupMenuButton参数const PopupMenuButton({ Key key, @required this.itemBuilder,//渲染下拉菜单函数,返回数组 this.initialValu...
输入框及表单TextFieldconst TextField({ Key key, this.controller, // 控制正在编辑文本 this.focusNode...
SliverAppBar参数const SliverAppBar({ Key key, this.leading, //左侧标题 this.automaticallyImplyLeading = true, ...
AspectRatio即用于设置特定长宽比的组件,主要参数aspectRatio用于设置要是使用的长宽比,使用较简单。class AspecrDemo extends Stateless...
GridView参数GridView可以构建一个二维网格列表,其默认构造函数定义如下:GridView({ Axis scrollDirection = Axis.vertical, bool re...
import 'package:flutter/material.dart'; import 'demo01/page_view.dart'; void main() => runApp(MyApp()); class My...
pageView参数PageView({ Key key, this.scrollDirection = Axis.horizontal, //方向 this.reverse = false, //是否和阅读方...