A RenderFlex overflowed by 265 pixels on the bottom.
class HomeSettingWifiSSIDAndSecurity extends StatefulWidget {
HomeSettingWifiSSIDAndSecurity({Key key}) : super(key: key);
@override
_HomeSettingWifiSSIDAndSecurityState createState() => _HomeSettingWifiSSIDAndSecurityState();
}
class _HomeSettingWifiSSIDAndSecurityState
extends State {
final _networkFormKey = GlobalKey();
Network network = Network();
String ssid;
String password;
@override
void initState() {
super.initState();
}
Future _onWillPop() {
return showDialog(
barrierDismissible: false,
context: context,
builder: (context) => new AlertDialog(
title: new Text('Are you sure?', style: me20blue),
content: new Text('Do you want to exit the App ?',
strutStyle: StrutStyle(height: 2), style: re16a54),
actions: [
new FlatButton(
onPressed: () => Navigator.of(context).pop(false),
child: new Text('No', style: me14blue),
),
new FlatButton(
onPressed: () => Navigator.of(context).pop(true),
child: new Text('Yes', style: me14blue),
),
],
),
) ??
false;
}
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: _onWillPop,
child:Scaffold(
appBar: new AppBar(
elevation: 0,
backgroundColor: Colors.transparent,
iconTheme: IconThemeData(
color: Color(0xFF000000),
),
automaticallyImplyLeading: true,
),
body: SingleChildScrollView(
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(height: MediaQuery.of(context).size.height * 45 / 640),
Padding(
padding: const EdgeInsets.fromLTRB(24, 0, 0, 0),
child: Text("Home network", style: me20blue),
),
SizedBox(height: MediaQuery.of(context).size.height * 17 / 640),
Form(
key: _networkFormKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(24,0, 46, 5),
child: Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
child: Text("SSID", style: re16grey),
),
],
),
),
// new Text(" SSID:"),
new Container(
child:new Flexible(///Flexible
child: new TextFormField(
decoration: InputDecoration(
labelStyle:me14grey,
labelText: 'SSID',
hintText: "New SSID",
border: OutlineInputBorder(borderSide: BorderSide()),
fillColor: Colors.white,
filled: true,
//prefixIcon: Icon(Icons.lock),
contentPadding: EdgeInsets.fromLTRB(10,5,10,5),
),
validator: (String value) {
//檢查是否非空
if (value.isEmpty) {
return 'Please enter your network SSID';
} else if (value.length > 32) {
return 'SSID is too long.';
}
return null;
},
onChanged: (String value) {
network.ssid = value;
},
),
),
//padding: const EdgeInsets.fromLTRB(0, 0, 8, 0),
),
Padding(
padding: const EdgeInsets.fromLTRB(16,0, 24, 5),
child: Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
),
],
),
),
],
),
SizedBox(height: MediaQuery.of(context).size.height * 17 / 640),
new Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(24,0, 10, 3),
child: Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
child: Text("Password", style: re16grey),
),
],
),
),
new Container(
child:new Expanded(
child: new TextFormField(
decoration: InputDecoration(
labelStyle:me14grey,
labelText: 'Password',
hintText: "New Password",
border: OutlineInputBorder(borderSide: BorderSide()),
fillColor: Colors.white,
filled: true,
//prefixIcon: Icon(Icons.lock),
contentPadding: EdgeInsets.fromLTRB(10,0,0,0),
),
validator: (String value) {
if (value.length < 8) {
return 'The password must be at least 8 characterics.';
}
return null;
},
onChanged: (String value) {
network.password = value;
},
),
),
//padding: const EdgeInsets.fromLTRB(0, 0, 8, 0),
),
Padding(
padding: const EdgeInsets.fromLTRB(16,0, 24, 5),
child: Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
),
],
),
),
],//widget
),
],
),
),
],
),
),
bottomNavigationBar: BottomAppBar(
color: Colors.transparent,
elevation: 0,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 8, 10),
child: OutlineButton(
child: Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
child: Text("BACK TO HOME", style: me14blue),
),
],
),
onPressed: () {
Navigator.pushAndRemoveUntil(
context,
MyCustomRoute100(builder: (context) => HomeHomePage()),
(Route<dynamic> rout) => false);
},
),
),
Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 24, 10),
child: OutlineButton(
borderSide: BorderSide(color: Color(0x66999999)),
child: Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
child: Text("NEXT", style: me14blue),
),
],
),
onPressed: () {
Navigator.push(
context,
MyCustomRoute100(
builder: (context) =>
//NextPage1,MeshWifiSetting
MasterCreatingYourWiFiNetwork()),
);
},
),
),
],
)),
),
);
}
}