Flutter 有人能帮我在这个颤振代码中放置提交按钮吗?我似乎不明白? 导入“包装:颤振/材料.省道”; 类CheckBoxInListview扩展StatefulWidget{ @凌驾 _CheckBoxInListviewState createState()=>\u CheckBoxInListviewState(); } 类_CheckBoxInListviewState扩展状态{ bool_isChecked=true; 列表_text=[“电影”、“音乐”、“运动”、“游戏”]; @凌驾 小部件构建(构建上下文){ 返回脚手架( appBar:appBar( 标题:文本(“选择要继续注册”), 背景颜色:Colors.blue, ), 正文:ListView( 填充:边缘设置。全部(8.0), 儿童:_文本 .map((文本)=>CheckboxListTile( 标题:文本(Text), 值:\已检查, 一旦更改:(val){ 设置状态(){ _isChecked=val; }); }, )) .toList(), ), ); } }
您可以根据需要自定义floatingActionButton:Flutter 有人能帮我在这个颤振代码中放置提交按钮吗?我似乎不明白? 导入“包装:颤振/材料.省道”; 类CheckBoxInListview扩展StatefulWidget{ @凌驾 _CheckBoxInListviewState createState()=>\u CheckBoxInListviewState(); } 类_CheckBoxInListviewState扩展状态{ bool_isChecked=true; 列表_text=[“电影”、“音乐”、“运动”、“游戏”]; @凌驾 小部件构建(构建上下文){ 返回脚手架( appBar:appBar( 标题:文本(“选择要继续注册”), 背景颜色:Colors.blue, ), 正文:ListView( 填充:边缘设置。全部(8.0), 儿童:_文本 .map((文本)=>CheckboxListTile( 标题:文本(Text), 值:\已检查, 一旦更改:(val){ 设置状态(){ _isChecked=val; }); }, )) .toList(), ), ); } },flutter,Flutter,您可以根据需要自定义floatingActionButton: import 'package:flutter/material.dart'; class CheckBoxInListview extends StatefulWidget { @override _CheckBoxInListviewState createState() => _CheckBoxInListviewState(); } class _CheckBoxInListviewState extend
import 'package:flutter/material.dart';
class CheckBoxInListview extends StatefulWidget {
@override
_CheckBoxInListviewState createState() => _CheckBoxInListviewState();
}
class _CheckBoxInListviewState extends State<CheckBoxInListview> {
bool _isChecked = true;
List<String> _texts = ["Movies", "Music", "Exercise", "Games"];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Select likes to proceed with registration"),
backgroundColor: Colors.blue,
),
body: ListView(
padding: EdgeInsets.all(8.0),
children: _texts
.map((text) => CheckboxListTile(
title: Text(text),
value: _isChecked,
onChanged: (val) {
setState(() {
_isChecked = val;
});
},
))
.toList(),
),
);
}
}
class\u CheckBoxInListviewState扩展状态{
bool_isChecked=true;
列表_text=[“电影”、“音乐”、“运动”、“游戏”];
@凌驾
小部件构建(构建上下文){
返回脚手架(
appBar:appBar(
标题:文本(“选择要继续注册”),
背景颜色:Colors.blue,
),
正文:ListView(
填充:边缘设置。全部(8.0),
儿童:_文本
.map((文本)=>CheckboxListTile(
标题:文本(Text),
值:\已检查,
一旦更改:(val){
设置状态(){
_isChecked=val;
});
},
))
.toList(),
),
floatingActionButton:RaisedButton(按下时为空),
);
}
}
您可以根据需要自定义floatingActionButton:
import 'package:flutter/material.dart';
class CheckBoxInListview extends StatefulWidget {
@override
_CheckBoxInListviewState createState() => _CheckBoxInListviewState();
}
class _CheckBoxInListviewState extends State<CheckBoxInListview> {
bool _isChecked = true;
List<String> _texts = ["Movies", "Music", "Exercise", "Games"];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Select likes to proceed with registration"),
backgroundColor: Colors.blue,
),
body: ListView(
padding: EdgeInsets.all(8.0),
children: _texts
.map((text) => CheckboxListTile(
title: Text(text),
value: _isChecked,
onChanged: (val) {
setState(() {
_isChecked = val;
});
},
))
.toList(),
),
);
}
}
class\u CheckBoxInListviewState扩展状态{
bool_isChecked=true;
列表_text=[“电影”、“音乐”、“运动”、“游戏”];
@凌驾
小部件构建(构建上下文){
返回脚手架(
appBar:appBar(
标题:文本(“选择要继续注册”),
背景颜色:Colors.blue,
),
正文:ListView(
填充:边缘设置。全部(8.0),
儿童:_文本
.map((文本)=>CheckboxListTile(
标题:文本(Text),
值:\已检查,
一旦更改:(val){
设置状态(){
_isChecked=val;
});
},
))
.toList(),
),
floatingActionButton:RaisedButton(按下时为空),
);
}
}
是的,将您需要的函数替换为“null”,您欢迎是的,将您需要的函数替换为“null”,您欢迎