149 lines
6.6 KiB
Dart
149 lines
6.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
import '../../../../app_settings/app_colors.dart';
|
|
import '../../../../tools/commonItem.dart';
|
|
import '../../../../tools/submitBtn.dart';
|
|
import '../../../../tools/titleAppBar.dart';
|
|
import '../../../../translations/trans_lib.dart';
|
|
|
|
class GatewayConfigurationWifiPage extends StatefulWidget {
|
|
const GatewayConfigurationWifiPage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<GatewayConfigurationWifiPage> createState() => _GatewayConfigurationWifiPageState();
|
|
}
|
|
|
|
class _GatewayConfigurationWifiPageState extends State<GatewayConfigurationWifiPage> {
|
|
final _wifiPassward = TextEditingController();
|
|
final _gatewayNamePassward = TextEditingController();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: AppColors.mainBackgroundColor,
|
|
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.gateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
|
body: Column(
|
|
children: [
|
|
Container(
|
|
width: 1.sw,
|
|
color: const Color(0xFFF2F6F9),
|
|
padding: EdgeInsets.all(15.h),
|
|
child: Text(TranslationLoader.lanKeys!.gatewayConfigurationWifiTip!.tr)
|
|
),
|
|
Expanded(
|
|
child: ListView(
|
|
children: [
|
|
CommonItem(leftTitel:TranslationLoader.lanKeys!.wifiName!.tr, rightTitle:"XinHongJia", allHeight:100.h, isHaveLine: true, isHaveDirection: true, action: (){
|
|
// Navigator.pushNamed(context, Routers.minePersonInfoSetSafetyProblemPage);
|
|
}),
|
|
CommonItem(leftTitel:TranslationLoader.lanKeys!.wifiPassward!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(_wifiPassward, TranslationLoader.lanKeys!.pleaseEnterTheWiFiPassword!.tr)),
|
|
SizedBox(height: 10.h,),
|
|
CommonItem(leftTitel:TranslationLoader.lanKeys!.gatewayName!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(_gatewayNamePassward, TranslationLoader.lanKeys!.pleaseEnterGatewayName!.tr)),
|
|
SizedBox(height: 10.h,),
|
|
CommonItem(leftTitel:TranslationLoader.lanKeys!.wifiMAC!.tr, rightTitle:"48:55:19:7d:84:7a", allHeight:100.h, isHaveLine: false),
|
|
SizedBox(height: 10.h,),
|
|
Visibility(
|
|
visible: true ,
|
|
child:Column(
|
|
children: [
|
|
CommonItem(leftTitel:TranslationLoader.lanKeys!.ipAddress!.tr, rightTitle:"192.168.1.1", allHeight:100.h, isHaveLine: true),
|
|
CommonItem(leftTitel:TranslationLoader.lanKeys!.subnetMask!.tr, rightTitle:"255.255.255.0", allHeight:100.h, isHaveLine: true),
|
|
CommonItem(leftTitel:TranslationLoader.lanKeys!.defaultGateway!.tr, rightTitle:"192.168.1.1", allHeight:100.h, isHaveLine: true),
|
|
SizedBox(height: 10.h,),
|
|
CommonItem(leftTitel:TranslationLoader.lanKeys!.automaticallyGetTheDNSServerAddress!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
|
Visibility(
|
|
visible: true,
|
|
child:Column(
|
|
children: [
|
|
CommonItem(leftTitel:TranslationLoader.lanKeys!.preferredDNS!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(_gatewayNamePassward, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
|
CommonItem(leftTitel:TranslationLoader.lanKeys!.alternativeDNS!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget: true, rightWidget: getTFWidget(_gatewayNamePassward, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
|
],
|
|
)
|
|
),
|
|
],
|
|
)
|
|
),
|
|
SizedBox(height: 50.h,),
|
|
SubmitBtn(
|
|
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
|
borderRadius: 20.w,
|
|
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w, bottom: 20.w),
|
|
padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
|
|
onClick: (){
|
|
// Navigator.pushNamed(context, Routers.seletGatewayPage);
|
|
}
|
|
),
|
|
SizedBox(height: 10.h,),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
children: [
|
|
GestureDetector(
|
|
child: SizedBox(
|
|
// width: 150.w,
|
|
height: 50.h,
|
|
// color: Colors.red,
|
|
child: Center(
|
|
child: Text(TranslationLoader.lanKeys!.noStaticIPIsUsed!.tr,style: TextStyle(fontSize: 28.sp, color: AppColors.mainColor)),
|
|
),
|
|
),
|
|
onTap: (){
|
|
// Navigator.pushNamed(context, Routers.starLockForgetPasswordPage);
|
|
},
|
|
),
|
|
SizedBox(width: 30.w),
|
|
],
|
|
),
|
|
SizedBox(height: 50.h,),
|
|
],
|
|
),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
// 接受者信息输入框
|
|
Widget getTFWidget(TextEditingController controller, String tfStr){
|
|
return SizedBox(
|
|
height: 50.h,
|
|
width: 400.w,
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: TextField(
|
|
//输入框一行
|
|
maxLines: 1,
|
|
controller: controller,
|
|
autofocus: false,
|
|
textAlign:TextAlign.end,
|
|
decoration: InputDecoration(
|
|
//输入里面输入文字内边距设置
|
|
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
|
hintText: tfStr,
|
|
//不需要输入框下划线
|
|
border: InputBorder.none,
|
|
),
|
|
),
|
|
),
|
|
SizedBox(width: 10.w,),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Switch _switch(){
|
|
return Switch(
|
|
value: false,
|
|
onChanged: (value){
|
|
// switchValue = !switchValue;
|
|
setState(() {
|
|
|
|
});
|
|
}
|
|
);
|
|
}
|
|
|
|
}
|