diff --git a/star_lock/android/build.gradle b/star_lock/android/build.gradle index 83ae2200..f8803dea 100644 --- a/star_lock/android/build.gradle +++ b/star_lock/android/build.gradle @@ -9,6 +9,7 @@ buildscript { classpath 'com.android.tools.build:gradle:7.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } + } allprojects { diff --git a/star_lock/images/lan/lan_en.json b/star_lock/images/lan/lan_en.json index e0d24590..6f5d42f4 100644 --- a/star_lock/images/lan/lan_en.json +++ b/star_lock/images/lan/lan_en.json @@ -217,6 +217,54 @@ "thirdPartyInformationSharingList":"Third party information sharing list", "logout":"Logout", "deleteAccount":"Delete Account", + "personalInformation":"Personal Information", + "avatar":"Avatar", + "nickName":"NickName", + "changeNickName":"Change NickName", + "modifyAccount":"Modify Account", + "resetPasswords":"Reset Passwords", + "safetyProblem":"Safety Problem", + "modifyAccountTip":"For the security of your account, please use the account password verification before modifying the account", + "pleaseEnterAccountNumber":"Please enter your account number", + "changeIphoneTip":"When you retrieve your password and log in to a new device, you can verify it with the attached phone", + "originalPassword":"Original Password", + "newPassword":"New Password", + "surePassword":"Sure Password", + "safetyProblemTip":"When you lose your phone, you can log in to the new device by answering the security questions you set", + "problemOne":"Problem One", + "problemTwo":"Problem Two", + "problemThree":"Problem Three", + "pleaseEnterYourAnswer":"Please Enter Your Answer", + + "designation": "designation", + "state": "State", + "wifiName": "Wifi Name", + "networkMAC": "Network MAC", + "gatewayUpgrade": "Gateway Upgrade", + "gatewayConnectionLock": "Gateway Connection Lock", + "strongSignal": "Strong Signal", + "mediumSignal": "Medium Signal", + "averageSignal": "Average Signal", + "weakSignal": "Weak Signal", + "selectGatewayType": "Select Gateway Type", + "addGateway": "Add Gateway", + "turnThePowerBackOn": "Turn The Power Back On", + "indicatorLight": "Indicator Light", + "seletGatewayTypeNextTip": "Repower the gateway and click Next when the indicator light flashes alternately", + "selectGateway": "Select Gateway", + "gatewayConfigurationWifiTip": "5G WiFi network is not supported, please choose 2.4G WiFi network for configuration", + "wifiPassward": "WiFi Passward", + "pleaseEnterTheWiFiPassword": "Please Enter The WiFi Password", + "gatewayName": "Gateway Name", + "pleaseEnterGatewayName": "Please Enter Gateway Name", + "wifiMAC": "WiFi MAC", + "ipAddress": "IP Address", + "subnetMask": "Subnet Mask", + "defaultGateway": "Default Gateway", + "automaticallyGetTheDNSServerAddress": "Automatically Get The DNS Server Address", + "preferredDNS": "Preferred DNS", + "alternativeDNS": "Alternative DNS", + "noStaticIPIsUsed": "No Static IP Is Used", "allLock":"All Lock", "searchAllLockType":"Search All Lock Type", diff --git a/star_lock/images/lan/lan_keys.json b/star_lock/images/lan/lan_keys.json index 5fbcd5ce..a0b26ca5 100644 --- a/star_lock/images/lan/lan_keys.json +++ b/star_lock/images/lan/lan_keys.json @@ -219,6 +219,54 @@ "thirdPartyInformationSharingList":"thirdPartyInformationSharingList", "logout":"logout", "deleteAccount":"deleteAccount", + "personalInformation":"personalInformation", + "avatar":"avatar", + "nickName":"nickName", + "changeNickName":"changeNickName", + "modifyAccount":"modifyAccount", + "resetPasswords":"resetPasswords", + "safetyProblem":"safetyProblem", + "modifyAccountTip":"modifyAccountTip", + "pleaseEnterAccountNumber":"pleaseEnterAccountNumber", + "changeIphoneTip":"changeIphoneTip", + "originalPassword":"originalPassword", + "newPassword":"newPassword", + "surePassword":"surePassword", + "safetyProblemTip":"safetyProblemTip", + "problemOne":"problemOne", + "problemTwo":"problemTwo", + "problemThree":"problemThree", + "pleaseEnterYourAnswer":"pleaseEnterYourAnswer", + + "designation": "designation", + "state": "state", + "wifiName": "wifiName", + "networkMAC": "networkMAC", + "gatewayUpgrade": "gatewayUpgrade", + "gatewayConnectionLock": "gatewayConnectionLock", + "strongSignal": "strongSignal", + "mediumSignal": "mediumSignal", + "averageSignal": "averageSignal", + "weakSignal": "weakSignal", + "selectGatewayType": "selectGatewayType", + "addGateway": "addGateway", + "turnThePowerBackOn": "turnThePowerBackOn", + "indicatorLight": "indicatorLight", + "seletGatewayTypeNextTip": "seletGatewayTypeNextTip", + "selectGateway": "selectGateway", + "gatewayConfigurationWifiTip": "gatewayConfigurationWifiTip", + "wifiPassward": "wifiPassward", + "pleaseEnterTheWiFiPassword": "pleaseEnterTheWiFiPassword", + "gatewayName": "gatewayName", + "pleaseEnterGatewayName": "pleaseEnterGatewayName", + "wifiMAC": "wifiMAC", + "ipAddress": "ipAddress", + "subnetMask": "subnetMask", + "defaultGateway": "defaultGateway", + "automaticallyGetTheDNSServerAddress": "automaticallyGetTheDNSServerAddress", + "preferredDNS": "preferredDNS", + "alternativeDNS": "alternativeDNS", + "noStaticIPIsUsed": "noStaticIPIsUsed", "allLock":"allLock", "searchAllLockType":"searchAllLockType", diff --git a/star_lock/images/lan/lan_zh.json b/star_lock/images/lan/lan_zh.json index 4a36f461..579f169b 100644 --- a/star_lock/images/lan/lan_zh.json +++ b/star_lock/images/lan/lan_zh.json @@ -218,6 +218,54 @@ "thirdPartyInformationSharingList":"第三方信息共享清单", "logout":"退出", "deleteAccount":"删除账号", + "personalInformation":"个人信息", + "avatar":"头像", + "nickName":"昵称", + "changeNickName":"修改昵称", + "modifyAccount":"修改账号", + "resetPasswords":"重置密码", + "safetyProblem":"安全问题", + "modifyAccountTip":"为了你的账号安全,修改账号前请先使用账号密码验证", + "pleaseEnterAccountNumber":"请输入账号", + "changeIphoneTip":"找回密码和登陆新设备时,可通过绑定的手机验证", + "originalPassword":"原密码", + "newPassword":"新密码", + "surePassword":"确认密码", + "safetyProblemTip":"当你手机丢了,可以通过回答设置的安全问题来登录新设备", + "problemOne":"问题一", + "problemTwo":"问题二", + "problemThree":"问题三", + "pleaseEnterYourAnswer":"请输入你的答案", + + "designation": "名称", + "state": "状态", + "wifiName": "WiFi名称", + "networkMAC": "网络MAC", + "gatewayUpgrade": "网关升级", + "gatewayConnectionLock": "网关连接的锁", + "strongSignal": "信号强", + "mediumSignal": "信号中等", + "averageSignal": "信号一般", + "weakSignal": "信号弱", + "selectGatewayType": "选择网关类型", + "addGateway": "添加网关", + "turnThePowerBackOn": "重新通电", + "indicatorLight": "指示灯", + "seletGatewayTypeNextTip": "将网关重新通电,指示灯交替闪烁时点击下一步", + "selectGateway": "选择网关", + "gatewayConfigurationWifiTip": "不支持5G WiFi网络,请选择2.4G WiFi网络进行配置", + "wifiPassward": "WiFi密码", + "pleaseEnterTheWiFiPassword": "请输入WiFi密码", + "gatewayName": "网关名称", + "pleaseEnterGatewayName": "请输入网关名称", + "wifiMAC": "网络MAC", + "ipAddress": "IP地址", + "subnetMask": "子网掩码", + "defaultGateway": "默认网关", + "automaticallyGetTheDNSServerAddress": "自动获取DNS服务器地址", + "preferredDNS": "首选DNS", + "alternativeDNS": "备选DNS", + "noStaticIPIsUsed": "不使用静态IP", "allLock":"所有锁", "searchAllLockType":"搜索所有锁类型", diff --git a/star_lock/images/mine/icon_mine_gatewayListMainIcon.png b/star_lock/images/mine/icon_mine_gatewayListMainIcon.png new file mode 100644 index 00000000..1f5e8c69 Binary files /dev/null and b/star_lock/images/mine/icon_mine_gatewayListMainIcon.png differ diff --git a/star_lock/images/mine/icon_mine_gatewayListNumber.png b/star_lock/images/mine/icon_mine_gatewayListNumber.png new file mode 100644 index 00000000..1d9c2118 Binary files /dev/null and b/star_lock/images/mine/icon_mine_gatewayListNumber.png differ diff --git a/star_lock/images/mine/icon_mine_gatewayListOnline.png b/star_lock/images/mine/icon_mine_gatewayListOnline.png new file mode 100644 index 00000000..4e60532c Binary files /dev/null and b/star_lock/images/mine/icon_mine_gatewayListOnline.png differ diff --git a/star_lock/images/mine/icon_mine_gatewaySignal_low.png b/star_lock/images/mine/icon_mine_gatewaySignal_low.png new file mode 100644 index 00000000..f8bc8d8b Binary files /dev/null and b/star_lock/images/mine/icon_mine_gatewaySignal_low.png differ diff --git a/star_lock/images/mine/icon_mine_gatewaySignal_lower.png b/star_lock/images/mine/icon_mine_gatewaySignal_lower.png new file mode 100644 index 00000000..46e66044 Binary files /dev/null and b/star_lock/images/mine/icon_mine_gatewaySignal_lower.png differ diff --git a/star_lock/images/mine/icon_mine_gatewaySignal_middle.png b/star_lock/images/mine/icon_mine_gatewaySignal_middle.png new file mode 100644 index 00000000..bb0bca1f Binary files /dev/null and b/star_lock/images/mine/icon_mine_gatewaySignal_middle.png differ diff --git a/star_lock/images/mine/icon_mine_gatewaySignal_prompt.png b/star_lock/images/mine/icon_mine_gatewaySignal_prompt.png new file mode 100644 index 00000000..72dd4b9d Binary files /dev/null and b/star_lock/images/mine/icon_mine_gatewaySignal_prompt.png differ diff --git a/star_lock/images/mine/icon_mine_gatewaySignal_strong.png b/star_lock/images/mine/icon_mine_gatewaySignal_strong.png new file mode 100644 index 00000000..5bd0fa08 Binary files /dev/null and b/star_lock/images/mine/icon_mine_gatewaySignal_strong.png differ diff --git a/star_lock/images/mine/icon_mine_main_about.png b/star_lock/images/mine/icon_mine_main_about.png new file mode 100644 index 00000000..811468c7 Binary files /dev/null and b/star_lock/images/mine/icon_mine_main_about.png differ diff --git a/star_lock/images/mine/icon_mine_main_personInfo.png b/star_lock/images/mine/icon_mine_main_personInfo.png new file mode 100644 index 00000000..c4cf8fb4 Binary files /dev/null and b/star_lock/images/mine/icon_mine_main_personInfo.png differ diff --git a/star_lock/images/mine/icon_mine_main_vip.png b/star_lock/images/mine/icon_mine_main_vip.png new file mode 100644 index 00000000..3fa63a1a Binary files /dev/null and b/star_lock/images/mine/icon_mine_main_vip.png differ diff --git a/star_lock/images/mine/icon_mine_seletGatewayType_G2.png b/star_lock/images/mine/icon_mine_seletGatewayType_G2.png new file mode 100644 index 00000000..944efb8c Binary files /dev/null and b/star_lock/images/mine/icon_mine_seletGatewayType_G2.png differ diff --git a/star_lock/images/mine/icon_mine_seletGatewayType_G4.png b/star_lock/images/mine/icon_mine_seletGatewayType_G4.png new file mode 100644 index 00000000..1aeb57a0 Binary files /dev/null and b/star_lock/images/mine/icon_mine_seletGatewayType_G4.png differ diff --git a/star_lock/images/mine/icon_mine_seletGatewayType_next.png b/star_lock/images/mine/icon_mine_seletGatewayType_next.png new file mode 100644 index 00000000..162a1ae4 Binary files /dev/null and b/star_lock/images/mine/icon_mine_seletGatewayType_next.png differ diff --git a/star_lock/ios/Podfile.lock b/star_lock/ios/Podfile.lock index 93e040b2..0995e36e 100644 --- a/star_lock/ios/Podfile.lock +++ b/star_lock/ios/Podfile.lock @@ -4,6 +4,8 @@ PODS: - Flutter (1.0.0) - flutter_native_contact_picker (0.0.1): - Flutter + - image_picker_ios (0.0.1): + - Flutter - package_info_plus (0.4.5): - Flutter - path_provider_foundation (0.0.1): @@ -14,6 +16,7 @@ DEPENDENCIES: - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - Flutter (from `Flutter`) - flutter_native_contact_picker (from `.symlinks/plugins/flutter_native_contact_picker/ios`) + - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) @@ -24,6 +27,8 @@ EXTERNAL SOURCES: :path: Flutter flutter_native_contact_picker: :path: ".symlinks/plugins/flutter_native_contact_picker/ios" + image_picker_ios: + :path: ".symlinks/plugins/image_picker_ios/ios" package_info_plus: :path: ".symlinks/plugins/package_info_plus/ios" path_provider_foundation: @@ -33,6 +38,7 @@ SPEC CHECKSUMS: device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_native_contact_picker: bd430ba0fbf82768bb50c2c52a69a65759a8f907 + image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5 package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8 diff --git a/star_lock/ios/Runner/Info.plist b/star_lock/ios/Runner/Info.plist index 9023ff34..fdd0760f 100644 --- a/star_lock/ios/Runner/Info.plist +++ b/star_lock/ios/Runner/Info.plist @@ -2,6 +2,16 @@ + NSCameraUsageDescription + 这是你的自拍照 + NSMicrophoneUsageDescription + 用于音频插件 + NSPhotoLibraryUsageDescription + 用于相册 + UIBackgroundModes + + remote-notification + NSContactsUsageDescription Reason we need access to the contact list CFBundleDevelopmentRegion diff --git a/star_lock/lib/appRouters.dart b/star_lock/lib/appRouters.dart index c1d60edc..59c23f96 100644 --- a/star_lock/lib/appRouters.dart +++ b/star_lock/lib/appRouters.dart @@ -41,6 +41,7 @@ import 'main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWireless import 'main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart'; import 'main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart'; import 'main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart'; +import 'mine/about/about_page.dart'; import 'mine/addLock/addLock/addLock_page.dart'; import 'main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_page.dart'; import 'main/lockDetail/authorizedAdmin/authorizedAdminDetail/authorizedAdminDetail_page.dart'; @@ -66,8 +67,25 @@ import 'mine/addLock/lockAddress/lockAddress_page.dart'; import 'mine/addLock/nearbyLock/nearbyLock_page.dart'; import 'mine/addLock/saveLock/saveLock_page.dart'; import 'mine/addLock/seletLockType/seletLockType_page.dart'; +import 'mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart'; +import 'mine/gateway/addGateway/seletGateway/seletGatewayList_page.dart'; +import 'mine/gateway/addGateway/seletGatewayType/seletGatewayType_page.dart'; +import 'mine/gateway/addGateway/seletGatewayTypeNextTip/seletGatewayTypeNextTip_page.dart'; +import 'mine/gateway/gatewayConnectionLock/gatewayConnectionLockList_page.dart'; +import 'mine/gateway/gatewayDetail/gatewayDetail_page.dart'; +import 'mine/gateway/gatewayList/gatewayList_page.dart'; +import 'mine/message/messageList_page.dart'; import 'mine/mineMultiLanguage/mineMultiLanguage_page.dart'; +import 'mine/minePersonInfo/minePersonInfo/minePersonInfo_page.dart'; +import 'mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/minePersonInfoEditAccount_page.dart'; +import 'mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_page.dart'; +import 'mine/minePersonInfo/minePersonInfoEditIphone/minePersonInfoEditIphone_page.dart'; +import 'mine/minePersonInfo/minePersonInfoEditName/minePersonInfoEditName_page.dart'; +import 'mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_page.dart'; +import 'mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_page.dart'; import 'mine/mine_page.dart'; +import 'mine/supportStaff/supportStaff_page.dart'; +import 'mine/valueAddedServices/valueAddedServices_page.dart'; import 'starLockApplication.dart'; abstract class Routers { @@ -136,6 +154,26 @@ abstract class Routers { static const mineSetPage = '/MineSetPage';// 我的设置 static const mineMultiLanguagePage = '/MineMultiLanguagePage';// 我的设置 + static const minePersonInfoPage = '/MinePersonInfoPage';// 我的信息 + static const minePersonInfoEditNamePage = '/MinePersonInfoEditNamePage';// 我的信息编辑昵称 + static const minePersonInfoEditAccountPage = '/MinePersonInfoEditAccountPage';// 我的信息修改账号 + static const minePersonInfoEditAccountNextPage = '/MinePersonInfoEditAccountNextPage';// 我的信息修改账号下一页 + static const minePersonInfoEditIphonePage = '/MinePersonInfoEditIphonePage';// 我的信息修改手机号 + static const minePersonInfoResetPasswordPage = '/MinePersonInfoResetPasswordPage';// 我的信息重置密码 + static const minePersonInfoSetSafetyProblemPage = '/MinePersonInfoSetSafetyProblemPage';// 我的信息设置安全问题 + + static const gatewayListPage = '/GatewayListPage';// 我的-网关 + static const gatewayDetailPage = '/GatewayDetailPage';// 我的-网关详情 + static const gatewayConnectionLockPage = '/GatewayConnectionLockPage';// 我的-网关网关链接的锁 + static const seletGatewayTypePage = '/SeletGatewayTypePage';// 我的-选择网关类型 + static const seletGatewayTypeNextTipPage = '/SeletGatewayTypeNextTipPage';// 我的-选择网关类型下一步 + static const seletGatewayPage = '/SeletGatewayPage';// 我的-选择网关 + static const gatewayConfigurationWifiPage = '/GatewayConfigurationWifiPage';// 我的-网关配置wifi + + static const messageListPage = '/MessageListPage';// 我的-消息 + static const supportStaffPage = '/SupportStaffPage';// 我的-客服 + static const valueAddedServicesPage = '/ValueAddedServicesPage';// 我的-增值服务 + static const abountPage = '/AbountPage';// 我的-关于 static const starLockLoginPage = '/StarLockLoginPage';// 登录 static const starLockRegisterPage = '/StarLockRegisterPage';// 注册 @@ -415,7 +453,79 @@ abstract class AppRouters { ), GetPage( name: Routers.checkingInDetailPage, - page: () => CheckingInDetailPage(), + page: () => const CheckingInDetailPage(), + ), + GetPage( + name: Routers.minePersonInfoPage, + page: () => const MinePersonInfoPage(), + ), + GetPage( + name: Routers.minePersonInfoEditNamePage, + page: () => const MinePersonInfoEditNamePage(), + ), + GetPage( + name: Routers.minePersonInfoEditAccountPage, + page: () => const MinePersonInfoEditAccountPage(), + ), + GetPage( + name: Routers.minePersonInfoEditIphonePage, + page: () => const MinePersonInfoEditIphonePage(), + ), + GetPage( + name: Routers.minePersonInfoResetPasswordPage, + page: () => const MinePersonInfoResetPasswordPage(), + ), + GetPage( + name: Routers.minePersonInfoSetSafetyProblemPage, + page: () => const MinePersonInfoSetSafetyProblemPage(), + ), + GetPage( + name: Routers.minePersonInfoEditAccountNextPage, + page: () => const MinePersonInfoEditAccountNextPage(), + ), + GetPage( + name: Routers.gatewayListPage, + page: () => const GatewayListPage(), + ), + GetPage( + name: Routers.messageListPage, + page: () => const MessageListPage(), + ), + GetPage( + name: Routers.supportStaffPage, + page: () => const SupportStaffPage(), + ), + GetPage( + name: Routers.valueAddedServicesPage, + page: () => const ValueAddedServicesPage(), + ), + GetPage( + name: Routers.abountPage, + page: () => const AbountPage(), + ), + GetPage( + name: Routers.gatewayDetailPage, + page: () => const GatewayDetailPage(), + ), + GetPage( + name: Routers.gatewayConnectionLockPage, + page: () => const GatewayConnectionLockListPage(), + ), + GetPage( + name: Routers.seletGatewayTypePage, + page: () => const SeletGatewayTypePage(), + ), + GetPage( + name: Routers.seletGatewayTypeNextTipPage, + page: () => const SeletGatewayTypeNextTipPage(), + ), + GetPage( + name: Routers.seletGatewayPage, + page: () => const SeletGatewayListPage(), + ), + GetPage( + name: Routers.gatewayConfigurationWifiPage, + page: () => const GatewayConfigurationWifiPage(), ), ]; } \ No newline at end of file diff --git a/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart b/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart index 0b3b6635..71946a56 100644 --- a/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart +++ b/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart @@ -8,8 +8,7 @@ import 'package:get/get.dart'; import '../../appRouters.dart'; import '../../app_settings/app_colors.dart'; -import '../../tools/forgetPwdInput.dart'; -import '../../tools/loginInput.dart'; +import '../../tools/tf_loginInput.dart'; import '../../tools/submitBtn.dart'; import '../../tools/titleAppBar.dart'; import '../../translations/trans_lib.dart'; @@ -43,51 +42,87 @@ class _StarLockForgetPasswordPageState extends State right: 40.w ), children: [ - LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, keyboardType: TextInputType.number,inputFormatters: [ - FilteringTextInputFormatter.allow(RegExp('[0-9]')), - LengthLimitingTextInputFormatter(20), + LoginInput(controller: _phoneController, + leftWidget:Padding( + padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + ), + hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp('[0-9]')), + LengthLimitingTextInputFormatter(20), ]), SizedBox(height: 10.w), - LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [ - LengthLimitingTextInputFormatter(20), + LoginInput( + controller: _pwdController, + isPwd: true, + leftWidget:Padding( + padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + ), + hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}", + inputFormatters: [ + LengthLimitingTextInputFormatter(20), ]), SizedBox(height: 15.w), Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),), SizedBox(height: 10.w), - LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.sure!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [ - LengthLimitingTextInputFormatter(20), - ]), + LoginInput( + controller: _pwdController, + isPwd: true, + leftWidget:Padding( + padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + ), + hintText: "${TranslationLoader.lanKeys!.sure!.tr} ${TranslationLoader.lanKeys!.password!.tr}", + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + ] + ), SizedBox(height: 10.w), - ForgetPwdInput(controller: _codeController,hintText: '${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}',keyboardType: TextInputType.number,inputFormatters: [ - FilteringTextInputFormatter.allow(RegExp('[0-9]')), - LengthLimitingTextInputFormatter(6), - ],rightSlot: Container( - // margin: EdgeInsets.only(right: 30.w), - child: GestureDetector( - child: Container( - width: 180.w, - height: 60.h, - padding: EdgeInsets.all(5.h), - decoration: BoxDecoration( - color: AppColors.mainColor, - borderRadius: BorderRadius.circular(5) - ), - child: Center( - child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle( + Row( + children: [ + Expanded( + child: LoginInput( + controller: _codeController, + isPwd: true, + leftWidget:Padding( + padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + ), + hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}", + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + ]), + ), + SizedBox(width: 20.w,), + GestureDetector( + child: Container( + width: 180.w, + height: 60.h, + padding: EdgeInsets.all(5.h), + decoration: BoxDecoration( + color: AppColors.mainColor, + borderRadius: BorderRadius.circular(5) + ), + child: Center( + child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle( color: Colors.white, fontSize: 26.sp, - )), + )), + ), ), - ), - onTap: (){ - if(_seconds==60){ - // _setVerify(); - }else{ - // Toast.show(msg: '正在获取验证码'); - } - }, - ), - )), + onTap: (){ + if(_seconds==60){ + // _setVerify(); + }else{ + // Toast.show(msg: '正在获取验证码'); + } + }, + ) + ], + ), SizedBox(height: 50.w), SubmitBtn(btnName: "${TranslationLoader.lanKeys!.reset!.tr} ${TranslationLoader.lanKeys!.password!.tr}", fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ diff --git a/star_lock/lib/login/login/starLock_login_page.dart b/star_lock/lib/login/login/starLock_login_page.dart index 260985a0..79eaeb87 100644 --- a/star_lock/lib/login/login/starLock_login_page.dart +++ b/star_lock/lib/login/login/starLock_login_page.dart @@ -6,7 +6,7 @@ import 'package:get/get.dart'; import '../../appRouters.dart'; import '../../app_settings/app_colors.dart'; -import '../../tools/loginInput.dart'; +import '../../tools/tf_loginInput.dart'; import '../../tools/submitBtn.dart'; import '../../tools/titleAppBar.dart'; import '../../translations/trans_lib.dart'; @@ -48,14 +48,32 @@ class _StarLockLoginPageState extends State { ) ), SizedBox(height: 50.w), - LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, keyboardType: TextInputType.number,inputFormatters: [ - FilteringTextInputFormatter.allow(RegExp('[0-9]')), - LengthLimitingTextInputFormatter(20), - ]), + LoginInput( + controller: _phoneController, + leftWidget:Padding( + padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + ), + hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp('[0-9]')), + LengthLimitingTextInputFormatter(20), + ] + ), SizedBox(height: 50.w), - LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [ - LengthLimitingTextInputFormatter(20), - ]), + LoginInput( + controller: _pwdController, + isPwd: true, + leftWidget:Padding( + padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + ), + hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}", + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + ] + ), SizedBox(height: 20.h), Row( mainAxisAlignment: MainAxisAlignment.start, diff --git a/star_lock/lib/login/register/starLock_register_page.dart b/star_lock/lib/login/register/starLock_register_page.dart index deb33226..d2cc9082 100644 --- a/star_lock/lib/login/register/starLock_register_page.dart +++ b/star_lock/lib/login/register/starLock_register_page.dart @@ -8,8 +8,7 @@ import 'package:get/get.dart'; import '../../appRouters.dart'; import '../../app_settings/app_colors.dart'; -import '../../tools/forgetPwdInput.dart'; -import '../../tools/loginInput.dart'; +import '../../tools/tf_loginInput.dart'; import '../../tools/submitBtn.dart'; import '../../tools/titleAppBar.dart'; import '../../translations/trans_lib.dart'; @@ -27,7 +26,6 @@ class _StarLockRegisterPageState extends State { final TextEditingController _codeController = TextEditingController(); late Timer _timer; - int _seconds = 60; @override @@ -157,51 +155,91 @@ class _StarLockRegisterPageState extends State { Widget middleTFWidget (){ return Column( children: [ - LoginInput(controller: _phoneController, leftImg:'images/main/icon_main_search.png', hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, keyboardType: TextInputType.number,inputFormatters: [ - FilteringTextInputFormatter.allow(RegExp('[0-9]')), - LengthLimitingTextInputFormatter(20), - ]), + LoginInput( + controller: _phoneController, + leftWidget:Padding( + padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + ), + hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp('[0-9]')), + LengthLimitingTextInputFormatter(20), + ] + ), SizedBox(height: 10.w), - LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [ - LengthLimitingTextInputFormatter(20), - ]), + LoginInput( + controller: _pwdController, + isPwd: true, + leftWidget:Padding( + padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + ), + hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}", + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + ] + ), SizedBox(height: 15.w), Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),), SizedBox(height: 10.w), - LoginInput(controller: _pwdController, isPwd: true, leftImg:'images/main/icon_main_search.png', hintText: "${TranslationLoader.lanKeys!.sure!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [ - LengthLimitingTextInputFormatter(20), - ]), + LoginInput( + controller: _pwdController, + isPwd: true, + leftWidget:Padding( + padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + ), + hintText: "${TranslationLoader.lanKeys!.sure!.tr} ${TranslationLoader.lanKeys!.password!.tr}", + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + ] + ), SizedBox(height: 10.w), - ForgetPwdInput(controller: _codeController,hintText: '${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}',keyboardType: TextInputType.number,inputFormatters: [ - FilteringTextInputFormatter.allow(RegExp('[0-9]')), - LengthLimitingTextInputFormatter(6), - ],rightSlot: Container( - // margin: EdgeInsets.only(right: 30.w), - child: GestureDetector( - child: Container( - width: 180.w, - height: 60.h, - padding: EdgeInsets.all(5.h), - decoration: BoxDecoration( - color: AppColors.mainColor, - borderRadius: BorderRadius.circular(5) - ), - child: Center( - child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s',textAlign:TextAlign.center, style: TextStyle( - color: Colors.white, - fontSize: 26.sp - )), + Row( + children: [ + Expanded( + child: LoginInput( + controller: _codeController, + isPwd: true, + leftWidget:Padding( + padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + ), + hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}", + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + ] ), ), - onTap: (){ - if(_seconds==60){ - // _setVerify(); - }else{ - // Toast.show(msg: '正在获取验证码'); - } - }, - ), - )), + SizedBox(width: 20.w,), + GestureDetector( + child: Container( + width: 180.w, + height: 60.h, + padding: EdgeInsets.all(5.h), + decoration: BoxDecoration( + color: AppColors.mainColor, + borderRadius: BorderRadius.circular(5) + ), + child: Center( + child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle( + color: Colors.white, + fontSize: 26.sp, + )), + ), + ), + onTap: (){ + if(_seconds==60){ + // _setVerify(); + }else{ + // Toast.show(msg: '正在获取验证码'); + } + }, + ) + ], + ), SizedBox(height: 50.w), ], ); diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart index 5d374e40..67a822ae 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart @@ -19,7 +19,7 @@ class CheckingInSetPage extends StatefulWidget { } class _CheckingInSetPageState extends State { - late TextEditingController _changeNameController; + final TextEditingController _changeNameController = TextEditingController(); @override Widget build(BuildContext context) { diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart index 2cf40566..bb89b5f2 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart @@ -19,7 +19,7 @@ class ElectronicKeyDetailPage extends StatefulWidget { } class _ElectronicKeyDetailPageState extends State { - late TextEditingController _changeNameController; + final TextEditingController _changeNameController = TextEditingController(); @override Widget build(BuildContext context) { @@ -119,7 +119,7 @@ class _ElectronicKeyDetailPageState extends State { showDialog( context: context, builder: (BuildContext context) { - return ShowTFView(title:"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}", tipTitle:"", controller: _changeNameController); + return ShowTFView(title:"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}", tipTitle:"请输入", controller: _changeNameController); }); } diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart index d8ff960b..d670a400 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart @@ -4,7 +4,7 @@ import 'package:flutter/services.dart'; import 'package:get/get.dart'; import '../../../../../app_settings/app_colors.dart'; -import '../../../../../tools/loginInput.dart'; +import '../../../../../tools/tf_loginInput.dart'; import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; @@ -36,7 +36,7 @@ class _EditLockNamePageState extends State { },), ],), body:Container( - child: LoginInput(controller: _changeLockNameController, leftImg:'', hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, inputFormatters: [ + child: LoginInput(controller: _changeLockNameController, leftWidget:const SizedBox(), hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), ) diff --git a/star_lock/lib/mine/about/about_page.dart b/star_lock/lib/mine/about/about_page.dart new file mode 100644 index 00000000..6406e87f --- /dev/null +++ b/star_lock/lib/mine/about/about_page.dart @@ -0,0 +1,29 @@ + +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +import '../../app_settings/app_colors.dart'; +import '../../tools/titleAppBar.dart'; +import '../../translations/trans_lib.dart'; + +class AbountPage extends StatefulWidget { + const AbountPage({Key? key}) : super(key: key); + + @override + State createState() => _AbountPageState(); +} + +class _AbountPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: const Color(0xFFFFFFFF), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.about!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body: Column( + children: [ + + ], + ), + ); + } +} diff --git a/star_lock/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart b/star_lock/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart new file mode 100644 index 00000000..67d7b5fe --- /dev/null +++ b/star_lock/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart @@ -0,0 +1,148 @@ +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 createState() => _GatewayConfigurationWifiPageState(); +} + +class _GatewayConfigurationWifiPageState extends State { + 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(() { + + }); + } + ); + } + +} diff --git a/star_lock/lib/mine/gateway/addGateway/seletGateway/seletGatewayList_page.dart b/star_lock/lib/mine/gateway/addGateway/seletGateway/seletGatewayList_page.dart new file mode 100644 index 00000000..a3987358 --- /dev/null +++ b/star_lock/lib/mine/gateway/addGateway/seletGateway/seletGatewayList_page.dart @@ -0,0 +1,88 @@ + +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../../appRouters.dart'; +import '../../../../app_settings/app_colors.dart'; +import '../../../../tools/titleAppBar.dart'; +import '../../../../translations/trans_lib.dart'; + +class SeletGatewayListPage extends StatefulWidget { + const SeletGatewayListPage({Key? key}) : super(key: key); + + @override + State createState() => _SeletGatewayListPageState(); +} + +class _SeletGatewayListPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.selectGateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body: ListView.builder( + itemCount:10, + itemBuilder: (c, index){ + return _seletGatewayListListItem('images/mine/icon_mine_gatewayListMainIcon.png', "G2 41c21c", "-34", (){ + Navigator.pushNamed(context, Routers.gatewayConfigurationWifiPage); + }); + } + ), + ); + } + + Widget _seletGatewayListListItem(String lockTypeIcon, String gateWayName, String networkSignal, Function() action){ + return GestureDetector( + onTap: action, + child: Container( + // height: 100.h, + margin: const EdgeInsets.only(bottom: 2), + padding: EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10.w), + ), + child: Row( + children: [ + SizedBox(width: 10.w,), + Image.asset(lockTypeIcon, width: 80.w, height: 80.w,), + SizedBox(width: 20.w,), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + // color: Colors.red, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(gateWayName, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ), + ], + ), + ), + SizedBox(height:5.h), + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Image.asset('images/mine/icon_mine_gatewaySignal_strong.png', width: 40.w, height: 40.w,), + SizedBox(width: 10.w,), + Text(networkSignal, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ), + ], + ), + ), + SizedBox(width:20.h), + ], + ), + ), + SizedBox(width:20.h), + Image.asset('images/icon_add_white.png', width: 70.w, height: 70.w, color: AppColors.mainColor,), + SizedBox(width: 20.w,), + ], + ), + ), + ); + } + +} diff --git a/star_lock/lib/mine/gateway/addGateway/seletGatewayType/seletGatewayType_page.dart b/star_lock/lib/mine/gateway/addGateway/seletGatewayType/seletGatewayType_page.dart new file mode 100644 index 00000000..a1acb4ca --- /dev/null +++ b/star_lock/lib/mine/gateway/addGateway/seletGatewayType/seletGatewayType_page.dart @@ -0,0 +1,59 @@ + +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../../appRouters.dart'; +import '../../../../app_settings/app_colors.dart'; +import '../../../../tools/titleAppBar.dart'; +import '../../../../translations/trans_lib.dart'; + +class SeletGatewayTypePage extends StatefulWidget { + const SeletGatewayTypePage({Key? key}) : super(key: key); + + @override + State createState() => _SeletGatewayTypePageState(); +} + +class _SeletGatewayTypePageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.selectGatewayType!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body:ListView( + children: [ + _seletGatewayType('images/mine/icon_mine_seletGatewayType_G2.png', "G2(Wi-Fi)", (){ + Navigator.pushNamed(context, Routers.seletGatewayTypeNextTipPage); + }), + SizedBox(height: 2.h,), + _seletGatewayType('images/mine/icon_mine_seletGatewayType_G4.png', "G4(4G) ", (){ + Navigator.pushNamed(context, Routers.seletGatewayTypeNextTipPage); + }), + ], + ) + ); + } + + Widget _seletGatewayType(String iconStr, String gatewayType, Function() action){ + return GestureDetector( + onTap: action, + child: Container( + color: Colors.white, + width: 1.sw, + height: 200.h, + padding: EdgeInsets.all(30.w), + child: Center( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset(iconStr, width: 150.w, height: 150.w,), + SizedBox(width: 30.w), + Text(gatewayType) + ], + ), + ), + ), + ); + } +} diff --git a/star_lock/lib/mine/gateway/addGateway/seletGatewayTypeNextTip/seletGatewayTypeNextTip_page.dart b/star_lock/lib/mine/gateway/addGateway/seletGatewayTypeNextTip/seletGatewayTypeNextTip_page.dart new file mode 100644 index 00000000..cd353918 --- /dev/null +++ b/star_lock/lib/mine/gateway/addGateway/seletGatewayTypeNextTip/seletGatewayTypeNextTip_page.dart @@ -0,0 +1,60 @@ + +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../../appRouters.dart'; +import '../../../../app_settings/app_colors.dart'; +import '../../../../tools/submitBtn.dart'; +import '../../../../tools/titleAppBar.dart'; +import '../../../../translations/trans_lib.dart'; + +class SeletGatewayTypeNextTipPage extends StatefulWidget { + const SeletGatewayTypeNextTipPage({Key? key}) : super(key: key); + + @override + State createState() => _SeletGatewayTypeNextTipPageState(); +} + +class _SeletGatewayTypeNextTipPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addGateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body:ListView( + children: [ + SizedBox(height: 40.h), + Center(child: Text(TranslationLoader.lanKeys!.turnThePowerBackOn!.tr, style: TextStyle(fontSize: 34.sp, fontWeight: FontWeight.w500),)), + SizedBox(height: 80.h), + Stack( + alignment: Alignment.center, + children: [ + Positioned( + bottom: 40.h, + left: 190.w, + child: Text(TranslationLoader.lanKeys!.indicatorLight!.tr) + ), + Image.asset("images/mine/icon_mine_seletGatewayType_next.png", width: 300.w, height: 300.w), + ], + ), + SizedBox(height: 50.w), + Container( + padding: EdgeInsets.all(20.w), + child: Center(child: Text(TranslationLoader.lanKeys!.seletGatewayTypeNextTip!.tr, textAlign: TextAlign.center,))) + , + SizedBox(height: 40.w), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.next!.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); + } + ), + ], + ) + ); + } +} diff --git a/star_lock/lib/mine/gateway/gatewayConnectionLock/gatewayConnectionLockList_page.dart b/star_lock/lib/mine/gateway/gatewayConnectionLock/gatewayConnectionLockList_page.dart new file mode 100644 index 00000000..e8fc166b --- /dev/null +++ b/star_lock/lib/mine/gateway/gatewayConnectionLock/gatewayConnectionLockList_page.dart @@ -0,0 +1,98 @@ + +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/titleAppBar.dart'; +import '../../../translations/trans_lib.dart'; + +class GatewayConnectionLockListPage extends StatefulWidget { + const GatewayConnectionLockListPage({Key? key}) : super(key: key); + + @override + State createState() => _GatewayConnectionLockListPageState(); +} + +class _GatewayConnectionLockListPageState extends State { + + @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: Colors.grey.shade300, + padding: EdgeInsets.all(15.h), + child: Text(TranslationLoader.lanKeys!.gatewayConnectionLock!.tr) + ), + Expanded( + child: ListView.builder( + itemCount:10, + itemBuilder: (c, index){ + return _gatewayConnectionLockListItem('images/mine/icon_mine_gatewaySignal_prompt.png', "MCBN01 8f3106", TranslationLoader.lanKeys!.strongSignal!.tr,(){ + // Navigator.pushNamed(context, Routers.gatewayDetailPage); + }); + } + ), + ) + ], + ), + ); + } + + Widget _gatewayConnectionLockListItem(String lockTypeIcon, String gateWayName, String signalStrength, Function() action){ + return GestureDetector( + onTap: action, + child: Container( + // height: 100.h, + margin: const EdgeInsets.only(bottom: 2), + padding: EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10.w), + ), + child: Row( + children: [ + SizedBox(width: 10.w,), + Image.asset(lockTypeIcon, width: 90.w, height: 90.w,), + SizedBox(width: 20.w,), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + // color: Colors.red, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(gateWayName, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ), + ], + ), + ), + SizedBox(height:5.h), + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Image.asset('images/mine/icon_mine_gatewaySignal_strong.png', width: 40.w, height: 40.w,), + SizedBox(width: 10.w,), + Text(signalStrength, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ), + ], + ), + ), + SizedBox(width:20.h), + ], + ), + ), + SizedBox(width:20.h), + + ], + ), + ), + ); + } +} diff --git a/star_lock/lib/mine/gateway/gatewayDetail/gatewayDetail_page.dart b/star_lock/lib/mine/gateway/gatewayDetail/gatewayDetail_page.dart new file mode 100644 index 00000000..0cafcf05 --- /dev/null +++ b/star_lock/lib/mine/gateway/gatewayDetail/gatewayDetail_page.dart @@ -0,0 +1,67 @@ + +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../appRouters.dart'; +import '../../../app_settings/app_colors.dart'; +import '../../../tools/commonItem.dart'; +import '../../../tools/showTFView.dart'; +import '../../../tools/submitBtn.dart'; +import '../../../tools/titleAppBar.dart'; +import '../../../translations/trans_lib.dart'; + +class GatewayDetailPage extends StatefulWidget { + const GatewayDetailPage({Key? key}) : super(key: key); + + @override + State createState() => _GatewayDetailPageState(); +} + +class _GatewayDetailPageState extends State { + final _changeGatewayNameController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.gateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body: ListView( + children: [ + CommonItem(leftTitel:TranslationLoader.lanKeys!.designation!.tr, rightTitle:"星锁网关", isHaveLine: true, isHaveDirection: true, action: (){ + showCupertinoAlertDialog(context); + }), + CommonItem(leftTitel:TranslationLoader.lanKeys!.state!.tr, rightTitle:"在线", isHaveLine: true, isHaveDirection: false), + CommonItem(leftTitel:TranslationLoader.lanKeys!.wifiName!.tr, rightTitle:"XinHongJia", isHaveLine: true, isHaveDirection: false), + CommonItem(leftTitel:TranslationLoader.lanKeys!.networkMAC!.tr, rightTitle:"39:23:df:34:12", isHaveLine: false, isHaveDirection: false), + SizedBox(height: 10.h,), + CommonItem(leftTitel:TranslationLoader.lanKeys!.nearbyLock!.tr, rightTitle:"2", isHaveLine: true, isHaveDirection: true, action: (){ + Navigator.pushNamed(context, Routers.gatewayConnectionLockPage); + }), + CommonItem(leftTitel:TranslationLoader.lanKeys!.wifiName!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ + + }), + SizedBox(height: 80.h,), + SubmitBtn(btnName: TranslationLoader.lanKeys!.delete!.tr, + borderRadius: 20.w, + fontSize: 32.sp, + margin: EdgeInsets.only(left: 30.w, right: 30.w), + padding: EdgeInsets.only(top: 15.w, bottom: 15.w), + onClick: () { + + } + ), + ], + ), + ); + } + + // 修改名字 + void showCupertinoAlertDialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return ShowTFView(title:"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}", tipTitle:"请输入", controller: _changeGatewayNameController); + }); + } +} diff --git a/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart b/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart new file mode 100644 index 00000000..585f32f4 --- /dev/null +++ b/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart @@ -0,0 +1,97 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../appRouters.dart'; +import '../../../app_settings/app_colors.dart'; +import '../../../tools/titleAppBar.dart'; +import '../../../translations/trans_lib.dart'; + +class GatewayListPage extends StatefulWidget { + const GatewayListPage({Key? key}) : super(key: key); + + @override + State createState() => _GatewayListPageState(); +} + +class _GatewayListPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.gateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + GestureDetector( + onTap: (){ + Navigator.pushNamed(context, Routers.seletGatewayTypePage); + }, + child: Image.asset('images/icon_add_white.png', width: 50.w, height: 50.w,) + ), + SizedBox(width: 30.w,), + ],), + body: ListView.builder( + itemCount:10, + itemBuilder: (c, index){ + return _gatewatListItem('images/mine/icon_mine_gatewayListMainIcon.png', "星锁网关", "在线", "2", (){ + Navigator.pushNamed(context, Routers.gatewayDetailPage); + }); + } + ), + ); + } + + Widget _gatewatListItem(String lockTypeIcon, String gateWayName, String isOnline, String lockNumber, Function() action){ + return GestureDetector( + onTap: action, + child: Container( + // height: 100.h, + margin: const EdgeInsets.only(bottom: 2), + padding: EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10.w), + ), + child: Row( + children: [ + SizedBox(width: 10.w,), + Image.asset(lockTypeIcon, width: 90.w, height: 90.w,), + SizedBox(width: 20.w,), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + // color: Colors.red, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(gateWayName, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ), + ], + ), + ), + SizedBox(height:5.h), + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Image.asset('images/mine/icon_mine_gatewayListOnline.png', width: 40.w, height: 40.w,), + SizedBox(width: 10.w,), + Text("在线", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ), + SizedBox(width: 80.w,), + Image.asset('images/mine/icon_mine_gatewayListNumber.png', width: 40.w, height: 40.w,), + SizedBox(width: 10.w,), + Text("2", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ), + ], + ), + ), + SizedBox(width:20.h), + ], + ), + ), + SizedBox(width:20.h), + + ], + ), + ), + ); + } +} diff --git a/star_lock/lib/mine/message/messageList_page.dart b/star_lock/lib/mine/message/messageList_page.dart new file mode 100644 index 00000000..c7e4eb80 --- /dev/null +++ b/star_lock/lib/mine/message/messageList_page.dart @@ -0,0 +1,85 @@ + +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../appRouters.dart'; +import '../../app_settings/app_colors.dart'; +import '../../tools/titleAppBar.dart'; +import '../../translations/trans_lib.dart'; + +class MessageListPage extends StatefulWidget { + const MessageListPage({Key? key}) : super(key: key); + + @override + State createState() => _MessageListPageState(); +} + +class _MessageListPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.message!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body: ListView.builder( + itemCount:10, + itemBuilder: (c, index){ + return _seletGatewayListListItem('images/mine/icon_mine_gatewayListMainIcon.png', "您的钥匙已发送成功", "2023.6.21 11.15", (){ + // Navigator.pushNamed(context, Routers.gatewayConfigurationWifiPage); + }); + } + ), + ); + } + + Widget _seletGatewayListListItem(String lockTypeIcon, String gateWayName, String networkSignal, Function() action){ + return GestureDetector( + onTap: action, + child: Container( + // height: 100.h, + margin: const EdgeInsets.only(bottom: 2), + padding: EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10.w), + ), + child: Row( + children: [ + SizedBox(width: 10.w,), + Image.asset(lockTypeIcon, width: 80.w, height: 80.w,), + SizedBox(width: 20.w,), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + // color: Colors.red, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(gateWayName, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ), + ], + ), + ), + SizedBox(height:5.h), + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + // Image.asset('images/mine/icon_mine_gatewaySignal_strong.png', width: 40.w, height: 40.w,), + // SizedBox(width: 10.w,), + Text(networkSignal, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ), + ], + ), + ), + SizedBox(width:20.h), + ], + ), + ) + ], + ), + ), + ); + } + +} diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfo/minePersonInfo_page.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfo/minePersonInfo_page.dart new file mode 100644 index 00000000..322071f7 --- /dev/null +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfo/minePersonInfo_page.dart @@ -0,0 +1,89 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:star_lock/app_settings/app_colors.dart'; +import 'package:star_lock/tools/seletImgTool.dart'; + +import '../../../appRouters.dart'; +import '../../../tools/commonItem.dart'; +import '../../../tools/titleAppBar.dart'; +import '../../../translations/trans_lib.dart'; + +class MinePersonInfoPage extends StatefulWidget { + const MinePersonInfoPage({Key? key}) : super(key: key); + + @override + State createState() => _MinePersonInfoPageState(); +} + +class _MinePersonInfoPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.personalInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body:Column( + children: [ + CommonItem(leftTitel:TranslationLoader.lanKeys!.avatar!.tr, rightTitle:"", allHeight: 100.h, isHaveLine: true,isHaveDirection: true,isHaveRightWidget:true, rightWidget: Container(width: 75.w, height: 75.h,child: Image.asset('images/mine/icon_mine_main_defaultAvatar.png')), action: (){ + _openModalBottomSheet(); + },), + CommonItem(leftTitel:TranslationLoader.lanKeys!.nickName!.tr, rightTitle:"你好", isHaveLine: true, isHaveDirection: true, action: (){ + Navigator.pushNamed(context, Routers.minePersonInfoEditNamePage); + }), + CommonItem(leftTitel:TranslationLoader.lanKeys!.accountNumber!.tr, rightTitle:"786612630@qq.com", isHaveLine: true, isHaveDirection: true, action: (){ + Navigator.pushNamed(context, Routers.minePersonInfoEditAccountPage); + }), + CommonItem(leftTitel:TranslationLoader.lanKeys!.iphone!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + Navigator.pushNamed(context, Routers.minePersonInfoEditIphonePage); + }), + CommonItem(leftTitel:TranslationLoader.lanKeys!.resetPasswords!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + Navigator.pushNamed(context, Routers.minePersonInfoResetPasswordPage); + }), + CommonItem(leftTitel:TranslationLoader.lanKeys!.safetyProblem!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){ + Navigator.pushNamed(context, Routers.minePersonInfoSetSafetyProblemPage); + }), + CommonItem(leftTitel:TranslationLoader.lanKeys!.countryAndRegion!.tr, rightTitle:"中国", isHaveLine: false, isHaveDirection: false), + ], + ) + ); + } + + Future _openModalBottomSheet() async { + final option = await showModalBottomSheet( + context: context, + builder: (BuildContext context) { + return Container( + height: 200.0, + child: Column( + children: [ + ListTile( + title: Text('拍照', textAlign: TextAlign.center), + onTap: () { + SeletImageTool().getCameraImage((imgStr) { + print("111111$imgStr"); + }); + }, + ), + ListTile( + title: Text('从相册选择', textAlign: TextAlign.center), + onTap: () { + SeletImageTool().getImage((imgStr) { + print("111111$imgStr"); + }); + }, + ), + ListTile( + title: Text('取消', textAlign: TextAlign.center), + onTap: () { + Navigator.pop(context, '取消'); + }, + ), + ], + ), + ); + } + ); + } + +} diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/minePersonInfoEditAccount_page.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/minePersonInfoEditAccount_page.dart new file mode 100644 index 00000000..fab8121d --- /dev/null +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/minePersonInfoEditAccount_page.dart @@ -0,0 +1,140 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../../appRouters.dart'; +import '../../../../app_settings/app_colors.dart'; +import '../../../../tools/submitBtn.dart'; +import '../../../../tools/titleAppBar.dart'; +import '../../../../translations/trans_lib.dart'; + +class MinePersonInfoEditAccountPage extends StatefulWidget { + const MinePersonInfoEditAccountPage({Key? key}) : super(key: key); + + @override + State createState() => _MinePersonInfoEditAccountPageState(); +} + +class _MinePersonInfoEditAccountPageState extends State { + final TextEditingController _editAccountController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body:Column( + children: [ + Container( + width: 1.sw, + color: Colors.grey.shade300, + padding: EdgeInsets.only(left:15.w, top: 10.h, bottom: 10.h), + child: Text(TranslationLoader.lanKeys!.modifyAccountTip!.tr) + ), + Container( + padding: EdgeInsets.all(30.w), + child: TextField( + maxLines: 1, + keyboardType: TextInputType.text, + // inputFormatters: inputFormatterstters??[], + controller:_editAccountController, + autofocus: false, + textAlign: TextAlign.start, + style:TextStyle( + height: 1.1, + fontSize: 30.sp, + fontWeight: FontWeight.w400, + color: const Color(0xFF333333) + ), + decoration: InputDecoration( + hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, + hintStyle: TextStyle( + height: 1.1, + fontSize: 30.sp, + fontWeight: FontWeight.w400, + color: const Color(0xFF999999) + ), + // labelText:"label", + labelStyle: const TextStyle(color: Color(0xFF999999)), + border: const OutlineInputBorder( + ///设置边框四个角的弧度 + borderRadius: BorderRadius.all(Radius.circular(10)), + ///用来配置边框的样式 + borderSide: BorderSide( + ///设置边框的颜色 + color: Color(0xffD3D3D3), + ///设置边框的粗细 + width: 1, + ), + ), + ///设置输入框可编辑时的边框样式 + enabledBorder: const OutlineInputBorder( + ///设置边框四个角的弧度 + borderRadius: BorderRadius.all(Radius.circular(10)), + ///用来配置边框的样式 + borderSide: BorderSide( + ///设置边框的颜色 + color: Color(0xffD3D3D3), + ///设置边框的粗细 + width: 1, + ), + ), + disabledBorder: const OutlineInputBorder( + ///设置边框四个角的弧度 + borderRadius: BorderRadius.all(Radius.circular(10)), + ///用来配置边框的样式 + borderSide: BorderSide( + ///设置边框的颜色 + color: Color(0xffD3D3D3), + ///设置边框的粗细 + width: 1, + ), + ), + ///用来配置输入框获取焦点时的颜色 + focusedBorder: const OutlineInputBorder( + ///设置边框四个角的弧度 + borderRadius: BorderRadius.all(Radius.circular(10)), + ///用来配置边框的样式 + borderSide: BorderSide( + ///设置边框的颜色 + color: Color(0xffD3D3D3), + ///设置边框的粗细 + width: 1, + ), + ), + ), + obscureText:false, + onChanged: (String value){ + + }, + ), + ), + SizedBox(height: 50.w), + SubmitBtn(btnName: TranslationLoader.lanKeys!.next!.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ + Navigator.pushNamed(context, Routers.minePersonInfoEditAccountNextPage); + }), + SizedBox(height: 50.w), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + GestureDetector( + child: SizedBox( + // width: 150.w, + height: 50.h, + // color: Colors.red, + child: Center( + child: Text('${TranslationLoader.lanKeys!.forgetPassword!.tr}?',style: TextStyle(fontSize: 24.sp)), + ), + ), + onTap: (){ + Navigator.pushNamed(context, Routers.starLockForgetPasswordPage); + }, + ), + SizedBox(width: 30.w), + ], + ), + ], + ) + ); + } +} diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_page.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_page.dart new file mode 100644 index 00000000..3ebde359 --- /dev/null +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_page.dart @@ -0,0 +1,80 @@ + +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../../appRouters.dart'; +import '../../../../app_settings/app_colors.dart'; +import '../../../../tools/submitBtn.dart'; +import '../../../../tools/tf_input_haveBorder.dart'; +import '../../../../tools/titleAppBar.dart'; +import '../../../../translations/trans_lib.dart'; + +class MinePersonInfoEditAccountNextPage extends StatefulWidget { + const MinePersonInfoEditAccountNextPage({Key? key}) : super(key: key); + + @override + State createState() => _MinePersonInfoEditAccountNextPageState(); +} + +class _MinePersonInfoEditAccountNextPageState extends State { + final TextEditingController _editAccountController = TextEditingController(); + late Timer _timer; + int _seconds = 60; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body:Column( + children: [ + Container( + width: 1.sw, + // color: Colors.grey, + padding: EdgeInsets.only(left:30.w, top: 15.h, bottom: 15.h), + child: Text(TranslationLoader.lanKeys!.pleaseEnterAccountNumber!.tr, style: TextStyle(fontWeight: FontWeight.w600),) + ), + Container( + padding: EdgeInsets.only(left:30.w, right:30.w, top: 10.h, bottom: 10.h), + child: TFInputHaveBorder(controller: _editAccountController, label: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,), + ), + Container( + padding: EdgeInsets.only(left:30.w, right:30.w, top: 20.h, bottom: 10.h), + child: TFInputHaveBorder(controller: _editAccountController, label: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}", rightSlot:GestureDetector( + child: Container( + width: 180.w, + height: 90.h, + padding: EdgeInsets.all(5.h), + margin: EdgeInsets.only(right: 10.w), + // decoration: BoxDecoration( + // color: AppColors.mainColor, + // borderRadius: BorderRadius.circular(5) + // ), + child: Center( + child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle( + color: Colors.grey, + fontSize: 26.sp, + )), + ), + ), + onTap: (){ + if(_seconds==60){ + // _setVerify(); + }else{ + // Toast.show(msg: '正在获取验证码'); + } + }, + )), + ), + SizedBox(height: 50.w), + SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ + + }), + ], + ) + ); + } +} diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoEditIphone/minePersonInfoEditIphone_page.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoEditIphone/minePersonInfoEditIphone_page.dart new file mode 100644 index 00000000..93910a40 --- /dev/null +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoEditIphone/minePersonInfoEditIphone_page.dart @@ -0,0 +1,116 @@ + +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../appRouters.dart'; +import '../../../app_settings/app_colors.dart'; +import '../../../tools/submitBtn.dart'; +import '../../../tools/tf_loginInput.dart'; +import '../../../tools/titleAppBar.dart'; +import '../../../translations/trans_lib.dart'; + +class MinePersonInfoEditIphonePage extends StatefulWidget { + const MinePersonInfoEditIphonePage({Key? key}) : super(key: key); + + @override + State createState() => _MinePersonInfoEditIphonePageState(); +} + +class _MinePersonInfoEditIphonePageState extends State { + final TextEditingController _phoneController = TextEditingController(); + final TextEditingController _codeController = TextEditingController(); + late Timer _timer; + int _seconds = 60; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.iphone!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body:Container( + padding: EdgeInsets.all(30.w), + child: Column( + children: [ + Container( + width: 1.sw, + padding: EdgeInsets.only(top: 5.h, bottom: 5.h), + child: Text(TranslationLoader.lanKeys!.changeIphoneTip!.tr) + ), + GestureDetector( + onTap: (){ + Navigator.pushNamed(context, Routers.seletCountryRegionPage); + }, + child: Container( + height: 70.h, + // color: Colors.red, + // padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w), + child: Row( + children: [ + SizedBox(width:5.w), + Expanded(child: Text(TranslationLoader.lanKeys!.countryAndRegion!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500))), + SizedBox(width:20.w), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Text("中国+86", textAlign: TextAlign.end, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500),) + ], + ), + SizedBox(width:5.w), + Image.asset('images/icon_right.png', width: 50.w, height: 50.w,), + ], + ), + ), + ), + Container(height: 0.5.h, color: Colors.grey,), + SizedBox(height: 10.w), + LoginInput(controller: _phoneController, isPwd: true, leftWidget:const SizedBox(), hintText: "${TranslationLoader.lanKeys!.sure!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + ]), + SizedBox(height: 10.w), + Row( + children: [ + Expanded( + child: LoginInput(controller: _codeController, isPwd: true, leftWidget:const SizedBox(), hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}",inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + ]), + ), + SizedBox(width: 20.w,), + GestureDetector( + child: Container( + width: 180.w, + // height: 60.h, + padding: EdgeInsets.all(8.h), + decoration: BoxDecoration( + color: AppColors.mainColor, + borderRadius: BorderRadius.circular(5) + ), + child: Center( + child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle( + color: Colors.white, + fontSize: 26.sp, + )), + ), + ), + onTap: (){ + if(_seconds==60){ + // _setVerify(); + }else{ + // Toast.show(msg: '正在获取验证码'); + } + }, + ) + ], + ), + SizedBox(height: 50.w), + SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ + + }), + ], + ), + ) + ); + } +} diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoEditName/minePersonInfoEditName_page.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoEditName/minePersonInfoEditName_page.dart new file mode 100644 index 00000000..a84fde95 --- /dev/null +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoEditName/minePersonInfoEditName_page.dart @@ -0,0 +1,44 @@ + +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/tf_loginInput.dart'; +import '../../../tools/titleAppBar.dart'; +import '../../../translations/trans_lib.dart'; + +class MinePersonInfoEditNamePage extends StatefulWidget { + const MinePersonInfoEditNamePage({Key? key}) : super(key: key); + + @override + State createState() => _MinePersonInfoEditNamePageState(); +} + +class _MinePersonInfoEditNamePageState extends State { + final TextEditingController _changeNickNameController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.changeNickName!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ + TextButton( + child: Text(TranslationLoader.lanKeys!.save!.tr, style: const TextStyle(color: Colors.white),), + onPressed: (){ + + },),], + ), + body:Container( + padding: EdgeInsets.all(15.w), + child: Column( + children: [ + LoginInput(controller: _changeNickNameController, isPwd: true, leftWidget:SizedBox(width: 15.w), hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + ]), + ], + ), + ) + ); + } +} diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_page.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_page.dart new file mode 100644 index 00000000..6c875413 --- /dev/null +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_page.dart @@ -0,0 +1,94 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../appRouters.dart'; +import '../../../app_settings/app_colors.dart'; +import '../../../tools/submitBtn.dart'; +import '../../../tools/tf_loginInput.dart'; +import '../../../tools/titleAppBar.dart'; +import '../../../translations/trans_lib.dart'; + +class MinePersonInfoResetPasswordPage extends StatefulWidget { + const MinePersonInfoResetPasswordPage({Key? key}) : super(key: key); + + @override + State createState() => _MinePersonInfoResetPasswordPageState(); +} + +class _MinePersonInfoResetPasswordPageState extends State { + final TextEditingController _oldPwdController = TextEditingController(); + final TextEditingController _newPwdController = TextEditingController(); + final TextEditingController _surePwdController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body:Container( + margin: EdgeInsets.only(left:30.w, right: 30.w), + child: Column( + children: [ + LoginInput( + controller: _oldPwdController, + isPwd: true, + leftWidget:Text("${TranslationLoader.lanKeys!.originalPassword!.tr} "), + hintText: "", + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + ] + ), + LoginInput( + controller: _newPwdController, + isPwd: true, + leftWidget:Text("${TranslationLoader.lanKeys!.newPassword!.tr} "), + hintText: "", + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + ] + ), + LoginInput( + controller: _surePwdController, + isPwd: true, + // isHaveLeftWidget: false, + leftWidget:Text("${TranslationLoader.lanKeys!.surePassword!.tr} "), + hintText: "", + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + ] + ), + Container( + width: 1.sw, + padding: EdgeInsets.only(top: 15.h, bottom: 10.h), + child: Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr, style: TextStyle(fontSize: 26.w)) + ), + SizedBox(height: 50.w), + SubmitBtn(btnName: TranslationLoader.lanKeys!.save!.tr, fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ + + }), + SizedBox(height: 50.w), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + GestureDetector( + child: SizedBox( + // width: 150.w, + height: 50.h, + // color: Colors.red, + child: Center( + child: Text('${TranslationLoader.lanKeys!.forgetPassword!.tr}?',style: TextStyle(color:AppColors.mainColor, fontSize: 24.sp)), + ), + ), + onTap: (){ + Navigator.pushNamed(context, Routers.starLockForgetPasswordPage); + }, + ) + ], + ), + ], + ), + ) + ); + } +} diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_page.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_page.dart new file mode 100644 index 00000000..11fcfa75 --- /dev/null +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_page.dart @@ -0,0 +1,121 @@ +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/tf_loginInput.dart'; +import '../../../tools/titleAppBar.dart'; +import '../../../translations/trans_lib.dart'; + +class MinePersonInfoSetSafetyProblemPage extends StatefulWidget { + const MinePersonInfoSetSafetyProblemPage({Key? key}) : super(key: key); + + @override + State createState() => _MinePersonInfoSetSafetyProblemPageState(); +} + +class _MinePersonInfoSetSafetyProblemPageState extends State { + final _fristEditingController = TextEditingController(); + final _secondEditingController = TextEditingController(); + final _thirdEditingController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body:ListView( + children: [ + Container( + width: 1.sw, + color: Colors.grey.shade300, + padding: EdgeInsets.all(20.h), + child: Text(TranslationLoader.lanKeys!.safetyProblemTip!.tr) + ), + _safityProblemItem(TranslationLoader.lanKeys!.problemOne!.tr, "", _fristEditingController, (){ + _seletProblemBottomSheet(); + }), + SizedBox(height: 10.h), + _safityProblemItem(TranslationLoader.lanKeys!.problemTwo!.tr, "", _secondEditingController, (){ + _seletProblemBottomSheet(); + }), + SizedBox(height: 10.h), + _safityProblemItem(TranslationLoader.lanKeys!.problemThree!.tr, "", _thirdEditingController, (){ + _seletProblemBottomSheet(); + }), + SizedBox(height: 50.h,), + SubmitBtn(btnName:TranslationLoader.lanKeys!.sure!.tr, + borderRadius: 20.w, + fontSize: 32.sp, + margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), + padding: EdgeInsets.only(top: 20.w, bottom: 20.w), + onClick: () { + + } + ), + ], + ) + ); + } + + Widget _safityProblemItem(String problemTitle, String answerTitle,TextEditingController controller, Function() action){ + return Column( + children: [ + CommonItem(leftTitel:problemTitle, rightTitle:"", isHaveLine: true, isHaveDirection: true, action:action), + Container( + color: Colors.white, + padding: EdgeInsets.only(left: 35.w), + child: TextField( + //输入框一行 + maxLines: 1, + controller: controller, + autofocus: false, + decoration: InputDecoration( + //输入里面输入文字内边距设置 + // contentPadding: const EdgeInsets.only(top: 8.0, left: -19.0, right: -15.0, bottom: 8.0), + // labelText: label, + hintText: TranslationLoader.lanKeys!.pleaseEnterYourAnswer!.tr, + //不需要输入框下划线 + border: InputBorder.none, + ), + obscureText:false, + ), + ) + ], + ); + } + + Future _seletProblemBottomSheet() async { + final option = await showModalBottomSheet( + context: context, + builder: (BuildContext context) { + return Container( + height: 400.0.h, + child: ListView( + children: [ + ListTile(title: Text('你第一次乘坐飞机取得是哪个城市?', textAlign: TextAlign.center), + onTap: () { + Navigator.of(context).pop(true); + }, + ), + ListTile(title: Text('你的QQ号码是多少', textAlign: TextAlign.center), + onTap: () { + Navigator.of(context).pop(true); + }, + ), + ListTile(title: Text('你的第一个宠物叫什么名字', textAlign: TextAlign.center), + onTap: () { + Navigator.of(context).pop(true); + }, + ), + + ], + ), + ); + } + ); + } + +} diff --git a/star_lock/lib/mine/mine_page.dart b/star_lock/lib/mine/mine_page.dart index cf4b8f4d..33389429 100644 --- a/star_lock/lib/mine/mine_page.dart +++ b/star_lock/lib/mine/mine_page.dart @@ -53,7 +53,7 @@ class _StarLockMinePageState extends State with BaseWidget{ width: 150.w, height: 150.w, decoration: BoxDecoration( border: Border.all(width: 2, color: Colors.white), - borderRadius: BorderRadius.circular(60.h), + borderRadius: BorderRadius.circular(75.h), ), padding: EdgeInsets.all(20.w), child: Image.asset('images/mine/icon_mine_main_defaultAvatar.png', width: 100.w, height: 100.w) @@ -62,7 +62,7 @@ class _StarLockMinePageState extends State with BaseWidget{ SizedBox(height: 20.h,), Text("15080825640", style: TextStyle(fontSize: 30.sp, color: Colors.white, fontWeight: FontWeight.w500)), SizedBox(height: 10.h,), - Text("账号:15080825640", style: TextStyle(fontSize: 22.sp, color: Colors.white, fontWeight: FontWeight.w500)), + Text("${TranslationLoader.lanKeys!.accountNumber!.tr}:15080825640", style: TextStyle(fontSize: 22.sp, color: Colors.white, fontWeight: FontWeight.w500)), ], ), ); @@ -73,29 +73,29 @@ class _StarLockMinePageState extends State with BaseWidget{ child: ListView( padding: EdgeInsets.only(left: 70.w, top: 50.h, right: 10.w), children: [ - mineItem('images/mine/icon_mine_main_personInfo.png', "个人信息", (){ - Navigator.pushNamed(context, Routers.seletLockTypePage); + mineItem('images/mine/icon_mine_main_personInfo.png', TranslationLoader.lanKeys!.personalInformation!.tr, (){ + Navigator.pushNamed(context, Routers.minePersonInfoPage); }), mineItem('images/mine/icon_mine_main_addLock.png', TranslationLoader.lanKeys!.addLock!.tr, (){ Navigator.pushNamed(context, Routers.seletLockTypePage); }), mineItem('images/mine/icon_mine_main_gateway.png', TranslationLoader.lanKeys!.gateway!.tr, (){ - + Navigator.pushNamed(context, Routers.gatewayListPage); }), mineItem('images/mine/icon_mine_main_message.png', TranslationLoader.lanKeys!.message!.tr, (){ - + Navigator.pushNamed(context, Routers.messageListPage); }), mineItem('images/mine/icon_mine_main_supportStaff.png', TranslationLoader.lanKeys!.supportStaff!.tr, (){ - + Navigator.pushNamed(context, Routers.supportStaffPage); }), mineItem('images/mine/icon_mine_main_set.png', TranslationLoader.lanKeys!.set!.tr, (){ Navigator.pushNamed(context, Routers.mineSetPage); }), mineItem('images/mine/icon_mine_main_vip.png', TranslationLoader.lanKeys!.valueAddedServices!.tr, (){ - + Navigator.pushNamed(context, Routers.valueAddedServicesPage); }), mineItem('images/mine/icon_mine_main_about.png', TranslationLoader.lanKeys!.about!.tr, (){ - + Navigator.pushNamed(context, Routers.abountPage); }), ], ), @@ -147,8 +147,8 @@ class _StarLockMinePageState extends State with BaseWidget{ child: Row( children: [ SizedBox(width:20.w), - Image.asset(lockTypeIcon, width: 50.w, height: 50.w,), - SizedBox(width:10.w), + Image.asset(lockTypeIcon, width: 40.w, height: 40.w,), + SizedBox(width:15.w), Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ), ], ), diff --git a/star_lock/lib/mine/supportStaff/supportStaff_page.dart b/star_lock/lib/mine/supportStaff/supportStaff_page.dart new file mode 100644 index 00000000..54b3ebf7 --- /dev/null +++ b/star_lock/lib/mine/supportStaff/supportStaff_page.dart @@ -0,0 +1,29 @@ + +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +import '../../app_settings/app_colors.dart'; +import '../../tools/titleAppBar.dart'; +import '../../translations/trans_lib.dart'; + +class SupportStaffPage extends StatefulWidget { + const SupportStaffPage({Key? key}) : super(key: key); + + @override + State createState() => _SupportStaffPageState(); +} + +class _SupportStaffPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: const Color(0xFFFFFFFF), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.supportStaff!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body: Column( + children: [ + + ], + ), + ); + } +} diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServices_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServices_page.dart new file mode 100644 index 00000000..1cfe01b2 --- /dev/null +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServices_page.dart @@ -0,0 +1,29 @@ + +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +import '../../app_settings/app_colors.dart'; +import '../../tools/titleAppBar.dart'; +import '../../translations/trans_lib.dart'; + +class ValueAddedServicesPage extends StatefulWidget { + const ValueAddedServicesPage({Key? key}) : super(key: key); + + @override + State createState() => _ValueAddedServicesPageState(); +} + +class _ValueAddedServicesPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: const Color(0xFFFFFFFF), + appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.valueAddedServices!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + body: Column( + children: [ + + ], + ), + ); + } +} diff --git a/star_lock/lib/tools/commonItem.dart b/star_lock/lib/tools/commonItem.dart index 925e8e13..0693f7cd 100644 --- a/star_lock/lib/tools/commonItem.dart +++ b/star_lock/lib/tools/commonItem.dart @@ -12,7 +12,14 @@ class CommonItem extends StatelessWidget { Function()? action; double? allHeight; - CommonItem({Key? key,required this.leftTitel, this.rightTitle, this.allHeight = 45.0, this.isHaveDirection = false, this.isHaveLine = false, this.isHaveRightWidget = false, this.rightWidget, this.action}) : super(key: key); + CommonItem({Key? key, + required this.leftTitel, + this.rightTitle, + this.allHeight = 45, + this.isHaveDirection = false, + this.isHaveLine = false, + this.isHaveRightWidget = false, + this.rightWidget, this.action}) : super(key: key); @override Widget build(BuildContext context) { @@ -24,7 +31,7 @@ class CommonItem extends StatelessWidget { Container( height: allHeight??70.h, color: Colors.white, - padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w), + padding: EdgeInsets.only(left:20.w, right: 10.w),// , top: 20.w, bottom: 20.w child: Row( children: [ SizedBox(width:20.w), diff --git a/star_lock/lib/tools/forgetPwdInput.dart b/star_lock/lib/tools/forgetPwdInput.dart deleted file mode 100644 index 38de0872..00000000 --- a/star_lock/lib/tools/forgetPwdInput.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; - -class ForgetPwdInput extends StatelessWidget { - TextEditingController? controller; - List? inputFormatters; - TextInputType? keyboardType; - String? hintText; - String? label; - Widget? rightSlot; - bool? isPwd; - ForgetPwdInput({Key? key, this.rightSlot, this.isPwd, this.label,this.hintText,this.keyboardType,this.inputFormatters, @required this.controller}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - child: Row( - children: [ - SizedBox(width: 90.w, height: 40.w,), - Expanded( - child: TextField( - //输入框一行 - maxLines: 1, - // controller: _controller, - autofocus: false, - decoration: InputDecoration( - //输入里面输入文字内边距设置 - contentPadding: const EdgeInsets.only( - top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), - hintText: hintText, - //不需要输入框下划线 - border: InputBorder.none, - ), - ), - ), - rightSlot??const SizedBox(width: 0,height: 0) - ], - ), - ), - Container(height: 0.5.h, color: Colors.grey,), - ], - ); - } -} diff --git a/star_lock/lib/tools/seletImgTool.dart b/star_lock/lib/tools/seletImgTool.dart new file mode 100644 index 00000000..c9181105 --- /dev/null +++ b/star_lock/lib/tools/seletImgTool.dart @@ -0,0 +1,54 @@ + +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:image_picker/image_picker.dart'; + +typedef BlockImgCallback = void Function(dynamic imgStr); + +class SeletImageTool { +// 实例化ImagePicker + final ImagePicker _picker = ImagePicker(); + ImageProvider? _imageProvider; + XFile? pickedFile; + XFile? cameraImages; + // 打开相机 + Future getCameraImage(BlockImgCallback callback) async { + try { + cameraImages = await _picker.pickImage(source: ImageSource.camera, maxWidth: 800); + if (cameraImages != null) { + // 获取图像地址 + _imageProvider = FileImage(File(cameraImages!.path)); + } else { + _imageProvider = null; + } + + } catch (e) { + if (e is MissingPluginException) { + // Toast.Show('当前平台不支持!'); + } else { + // Toast.Show('暂未开放相机权限'); + } + } + } + + // 打开相册 + Future getImage(BlockImgCallback callback) async { + try { + pickedFile = await _picker.pickImage(source: ImageSource.gallery, maxWidth: 800); + if (pickedFile != null) { + // 获取图像地址 + _imageProvider = FileImage(File(pickedFile!.path)); + } else { + _imageProvider = null; + } + } catch (e) { + if (e is MissingPluginException) { + // Toast.Show('当前平台不支持!'); + } else { + // Toast.Show('暂未开放相册权限'); + } + } + } +} \ No newline at end of file diff --git a/star_lock/lib/tools/showBottomSheetTool.dart b/star_lock/lib/tools/showBottomSheetTool.dart index 86ff18db..b30b054f 100644 --- a/star_lock/lib/tools/showBottomSheetTool.dart +++ b/star_lock/lib/tools/showBottomSheetTool.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_picker/flutter_picker.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; ///2023/7/17 ///底部弹出选择器工具类 @@ -19,12 +20,13 @@ class ShowBottomSheetTool { //字体大小 double textFontSize; - ShowBottomSheetTool( - {this.pickerHeight = 200.0, - this.itemHeight = 45.0, - this.btnColor = Colors.black, - this.titleColor = const Color.fromRGBO(127, 127, 127, 1.0), - this.textFontSize = 16.0}); + ShowBottomSheetTool({ + this.pickerHeight = 200.0, + this.itemHeight = 45.0, + this.btnColor = Colors.black, + this.titleColor = const Color.fromRGBO(127, 127, 127, 1.0), + this.textFontSize = 16.0 + }); ///单列 void showSingleRowPicker( diff --git a/star_lock/lib/tools/showTFView.dart b/star_lock/lib/tools/showTFView.dart index 1f05b803..dc3b0c3d 100644 --- a/star_lock/lib/tools/showTFView.dart +++ b/star_lock/lib/tools/showTFView.dart @@ -66,14 +66,14 @@ class ShowTFView extends StatelessWidget { ), actions: [ CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.cancel!.tr), + child: Text(TranslationLoader.lanKeys!.cancel!.tr, style: const TextStyle(color: Colors.black),), onPressed: () { Navigator.pop(context); // print("取消"); }, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.sure!.tr), + child: Text(TranslationLoader.lanKeys!.sure!.tr, style: const TextStyle(color: Colors.black)), onPressed: () { Navigator.pop(context); // print("确定"); diff --git a/star_lock/lib/tools/tf_input_haveBorder.dart b/star_lock/lib/tools/tf_input_haveBorder.dart new file mode 100644 index 00000000..96e7b3a3 --- /dev/null +++ b/star_lock/lib/tools/tf_input_haveBorder.dart @@ -0,0 +1,102 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +/* +* 登录注册页面 input +* */ + +class TFInputHaveBorder extends StatelessWidget { + + TextEditingController? controller; + List? inputFormatters; + TextInputType? keyboardType; + Color? background; + String? hintText; + String? leftImg; + String? label; + bool? isPwd; + Widget? rightSlot; + TFInputHaveBorder({Key? key, required this.controller,this.rightSlot,this.label,this.isPwd,this.inputFormatters,this.keyboardType,this.background,this.hintText, this.leftImg}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Stack( + alignment: Alignment.centerRight, + children: [ + TextField( + maxLines: 1, + keyboardType: TextInputType.text, + // inputFormatters: inputFormatterstters??[], + controller:controller, + autofocus: false, + textAlign: TextAlign.start, + style:TextStyle(height: 1.1, fontSize: 30.sp, fontWeight: FontWeight.w400, color: const Color(0xFF333333)), + decoration: InputDecoration( + hintText: label, + hintStyle: TextStyle( + height: 1.1, + fontSize: 30.sp, + fontWeight: FontWeight.w400, + color: const Color(0xFF999999) + ), + // labelText:"label", + labelStyle: const TextStyle(color: Color(0xFF999999)), + border: const OutlineInputBorder( + ///设置边框四个角的弧度 + borderRadius: BorderRadius.all(Radius.circular(10)), + ///用来配置边框的样式 + borderSide: BorderSide( + ///设置边框的颜色 + color: Color(0xffD3D3D3), + ///设置边框的粗细 + width: 1, + ), + ), + ///设置输入框可编辑时的边框样式 + enabledBorder: const OutlineInputBorder( + ///设置边框四个角的弧度 + borderRadius: BorderRadius.all(Radius.circular(10)), + ///用来配置边框的样式 + borderSide: BorderSide( + ///设置边框的颜色 + color: Color(0xffD3D3D3), + ///设置边框的粗细 + width: 1, + ), + ), + disabledBorder: const OutlineInputBorder( + ///设置边框四个角的弧度 + borderRadius: BorderRadius.all(Radius.circular(10)), + ///用来配置边框的样式 + borderSide: BorderSide( + ///设置边框的颜色 + color: Color(0xffD3D3D3), + ///设置边框的粗细 + width: 1, + ), + ), + ///用来配置输入框获取焦点时的颜色 + focusedBorder: const OutlineInputBorder( + ///设置边框四个角的弧度 + borderRadius: BorderRadius.all(Radius.circular(10)), + ///用来配置边框的样式 + borderSide: BorderSide( + ///设置边框的颜色 + color: Color(0xffD3D3D3), + ///设置边框的粗细 + width: 1, + ), + ), + ), + obscureText:false, + onChanged: (String value){ + + }, + ), + rightSlot??const SizedBox(width: 0,height: 0) + ], + ); + } +} diff --git a/star_lock/lib/tools/loginInput.dart b/star_lock/lib/tools/tf_loginInput.dart similarity index 73% rename from star_lock/lib/tools/loginInput.dart rename to star_lock/lib/tools/tf_loginInput.dart index c6790038..2862b123 100644 --- a/star_lock/lib/tools/loginInput.dart +++ b/star_lock/lib/tools/tf_loginInput.dart @@ -14,11 +14,12 @@ class LoginInput extends StatelessWidget { TextInputType? keyboardType; Color? background; String? hintText; - String? leftImg; + bool? isHaveLeftWidget; + Widget? leftWidget; String? label; bool? isPwd; Widget? rightSlot; - LoginInput({Key? key, required this.controller,this.rightSlot,this.label,this.isPwd,this.inputFormatters,this.keyboardType,this.background,this.hintText, this.leftImg}) : super(key: key); + LoginInput({Key? key, required this.controller,this.rightSlot,this.label,this.isPwd,this.inputFormatters,this.keyboardType,this.background,this.hintText, this.isHaveLeftWidget = true, this.leftWidget}) : super(key: key); @override Widget build(BuildContext context) { @@ -35,18 +36,15 @@ class LoginInput extends StatelessWidget { autofocus: false, decoration: InputDecoration( //输入里面输入文字内边距设置 - contentPadding: const EdgeInsets.only( - top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), + contentPadding: const EdgeInsets.only(top: 8.0, left: -19.0, right: -15.0, bottom: 8.0), labelText: label, hintText: hintText, //不需要输入框下划线 border: InputBorder.none, //左边图标设置 - icon: (leftImg!.isNotEmpty)?Padding( - padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset(leftImg!, width: 40.w, height: 40.w,), - ):SizedBox(width: 65.w, height: 40.w,), + icon: isHaveLeftWidget == true?leftWidget:SizedBox(width: 20.w, height: 40.w,), ), + obscureText: isPwd??false, ), Container(height: 0.5.h, color: Colors.grey,), ], diff --git a/star_lock/lib/translations/lanKeyEntity.dart b/star_lock/lib/translations/lanKeyEntity.dart index 7a34486e..4ce1d017 100644 --- a/star_lock/lib/translations/lanKeyEntity.dart +++ b/star_lock/lib/translations/lanKeyEntity.dart @@ -220,6 +220,54 @@ class LanKeyEntity { this.thirdPartyInformationSharingList, this.logout, this.deleteAccount, + this.personalInformation, + this.avatar, + this.nickName, + this.changeNickName, + this.modifyAccount, + this.resetPasswords, + this.safetyProblem, + this.modifyAccountTip, + this.pleaseEnterAccountNumber, + this.changeIphoneTip, + this.originalPassword, + this.newPassword, + this.surePassword, + this.safetyProblemTip, + this.problemOne, + this.problemTwo, + this.problemThree, + this.pleaseEnterYourAnswer, + + this.designation, + this.state, + this.wifiName, + this.networkMAC, + this.gatewayUpgrade, + this.gatewayConnectionLock, + this.strongSignal, + this.mediumSignal, + this.averageSignal, + this.weakSignal, + this.selectGatewayType, + this.addGateway, + this.turnThePowerBackOn, + this.indicatorLight, + this.seletGatewayTypeNextTip, + this.selectGateway, + this.gatewayConfigurationWifiTip, + this.wifiPassward, + this.pleaseEnterTheWiFiPassword, + this.gatewayName, + this.pleaseEnterGatewayName, + this.wifiMAC, + this.ipAddress, + this.subnetMask, + this.defaultGateway, + this.automaticallyGetTheDNSServerAddress, + this.preferredDNS, + this.alternativeDNS, + this.noStaticIPIsUsed, this.allLock, this.searchAllLockType, @@ -470,6 +518,57 @@ class LanKeyEntity { thirdPartyInformationSharingList = json['thirdPartyInformationSharingList']; logout = json['logout']; deleteAccount = json['deleteAccount']; + personalInformation = json['personalInformation']; + avatar = json['avatar']; + nickName = json['nickName']; + changeNickName = json['changeNickName']; + modifyAccount = json['modifyAccount']; + resetPasswords = json['resetPasswords']; + safetyProblem = json['safetyProblem']; + modifyAccountTip = json['modifyAccountTip']; + pleaseEnterAccountNumber = json['pleaseEnterAccountNumber']; + changeIphoneTip = json['changeIphoneTip']; + originalPassword = json['originalPassword']; + newPassword = json['newPassword']; + surePassword = json['surePassword']; + safetyProblemTip = json['safetyProblemTip']; + problemOne = json['problemOne']; + problemTwo = json['problemTwo']; + problemThree = json['problemThree']; + pleaseEnterYourAnswer = json['pleaseEnterYourAnswer']; + + designation = json['designation']; + state = json['state']; + wifiName = json['wifiName']; + networkMAC = json['networkMAC']; + gatewayUpgrade = json['gatewayUpgrade']; + gatewayConnectionLock = json['gatewayConnectionLock']; + strongSignal = json['strongSignal']; + mediumSignal = json['mediumSignal']; + averageSignal = json['averageSignal']; + weakSignal = json['weakSignal']; + selectGatewayType = json['selectGatewayType']; + addGateway = json['addGateway']; + turnThePowerBackOn = json['turnThePowerBackOn']; + indicatorLight = json['indicatorLight']; + seletGatewayTypeNextTip = json['seletGatewayTypeNextTip']; + selectGateway = json['selectGateway']; + gatewayConfigurationWifiTip = json['gatewayConfigurationWifiTip']; + wifiPassward = json['wifiPassward']; + pleaseEnterTheWiFiPassword = json['pleaseEnterTheWiFiPassword']; + gatewayName = json['gatewayName']; + pleaseEnterGatewayName = json['pleaseEnterGatewayName']; + gatewayName = json['gatewayName']; + pleaseEnterGatewayName = json['pleaseEnterGatewayName']; + wifiMAC = json['wifiMAC']; + ipAddress = json['ipAddress']; + subnetMask = json['subnetMask']; + defaultGateway = json['defaultGateway']; + automaticallyGetTheDNSServerAddress = json['automaticallyGetTheDNSServerAddress']; + preferredDNS = json['preferredDNS']; + alternativeDNS = json['alternativeDNS']; + noStaticIPIsUsed = json['noStaticIPIsUsed']; + allLock = json['allLock']; searchAllLockType = json['searchAllLockType']; @@ -648,7 +747,6 @@ class LanKeyEntity { String? leaveEarly; String? noCardPunched; - String? basicInformation; String? wirelessKeyboard; String? doorMagnetic; @@ -719,6 +817,54 @@ class LanKeyEntity { String? thirdPartyInformationSharingList; String? logout; String? deleteAccount; + String? personalInformation; + String? avatar; + String? nickName; + String? changeNickName; + String? modifyAccount; + String? resetPasswords; + String? safetyProblem; + String? modifyAccountTip; + String? pleaseEnterAccountNumber; + String? changeIphoneTip; + String? originalPassword; + String? newPassword; + String? surePassword; + String? safetyProblemTip; + String? problemOne; + String? problemTwo; + String? problemThree; + String? pleaseEnterYourAnswer; + + String? designation; + String? state; + String? wifiName; + String? networkMAC; + String? gatewayUpgrade; + String? gatewayConnectionLock; + String? strongSignal; + String? mediumSignal; + String? averageSignal; + String? weakSignal; + String? selectGatewayType; + String? addGateway; + String? turnThePowerBackOn; + String? indicatorLight; + String? seletGatewayTypeNextTip; + String? selectGateway; + String? gatewayConfigurationWifiTip; + String? wifiPassward; + String? pleaseEnterTheWiFiPassword; + String? gatewayName; + String? pleaseEnterGatewayName; + String? wifiMAC; + String? ipAddress; + String? subnetMask; + String? defaultGateway; + String? automaticallyGetTheDNSServerAddress; + String? preferredDNS; + String? alternativeDNS; + String? noStaticIPIsUsed; String? allLock; String? searchAllLockType; @@ -970,6 +1116,55 @@ class LanKeyEntity { map['thirdPartyInformationSharingList'] = thirdPartyInformationSharingList; map['logout'] = logout; map['deleteAccount'] = deleteAccount; + map['personalInformation'] = personalInformation; + map['avatar'] = avatar; + map['nickName'] = nickName; + map['changeNickName'] = changeNickName; + map['modifyAccount'] = modifyAccount; + map['resetPasswords'] = resetPasswords; + map['safetyProblem'] = safetyProblem; + map['safetyProblem'] = safetyProblem; + map['modifyAccountTip'] = modifyAccountTip; + map['pleaseEnterAccountNumber'] = pleaseEnterAccountNumber; + map['changeIphoneTip'] = changeIphoneTip; + map['originalPassword'] = originalPassword; + map['newPassword'] = newPassword; + map['surePassword'] = surePassword; + map['safetyProblemTip'] = safetyProblemTip; + map['problemOne'] = problemOne; + map['problemTwo'] = problemTwo; + map['problemThree'] = problemThree; + map['pleaseEnterYourAnswer'] = pleaseEnterYourAnswer; + + map['designation'] = designation; + map['state'] = state; + map['wifiName'] = wifiName; + map['networkMAC'] = networkMAC; + map['gatewayUpgrade'] = gatewayUpgrade; + map['gatewayConnectionLock'] = gatewayConnectionLock; + map['strongSignal'] = strongSignal; + map['mediumSignal'] = mediumSignal; + map['averageSignal'] = averageSignal; + map['weakSignal'] = weakSignal; + map['selectGatewayType'] = selectGatewayType; + map['addGateway'] = addGateway; + map['turnThePowerBackOn'] = turnThePowerBackOn; + map['indicatorLight'] = indicatorLight; + map['seletGatewayTypeNextTip'] = seletGatewayTypeNextTip; + map['selectGateway'] = selectGateway; + map['gatewayConfigurationWifiTip'] = gatewayConfigurationWifiTip; + map['wifiPassward'] = wifiPassward; + map['pleaseEnterTheWiFiPassword'] = pleaseEnterTheWiFiPassword; + map['gatewayName'] = gatewayName; + map['pleaseEnterGatewayName'] = pleaseEnterGatewayName; + map['wifiMAC'] = wifiMAC; + map['ipAddress'] = ipAddress; + map['subnetMask'] = subnetMask; + map['defaultGateway'] = defaultGateway; + map['automaticallyGetTheDNSServerAddress'] = automaticallyGetTheDNSServerAddress; + map['preferredDNS'] = preferredDNS; + map['alternativeDNS'] = alternativeDNS; + map['noStaticIPIsUsed'] = noStaticIPIsUsed; map['allLock'] = allLock; map['searchAllLockType'] = searchAllLockType; diff --git a/star_lock/linux/flutter/generated_plugin_registrant.cc b/star_lock/linux/flutter/generated_plugin_registrant.cc index e71a16d2..64a0ecea 100644 --- a/star_lock/linux/flutter/generated_plugin_registrant.cc +++ b/star_lock/linux/flutter/generated_plugin_registrant.cc @@ -6,6 +6,10 @@ #include "generated_plugin_registrant.h" +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); + file_selector_plugin_register_with_registrar(file_selector_linux_registrar); } diff --git a/star_lock/linux/flutter/generated_plugins.cmake b/star_lock/linux/flutter/generated_plugins.cmake index 2e1de87a..2db3c22a 100644 --- a/star_lock/linux/flutter/generated_plugins.cmake +++ b/star_lock/linux/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_selector_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/star_lock/macos/Flutter/GeneratedPluginRegistrant.swift b/star_lock/macos/Flutter/GeneratedPluginRegistrant.swift index 47b97425..9bbe890f 100644 --- a/star_lock/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/star_lock/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,11 +6,13 @@ import FlutterMacOS import Foundation import device_info_plus +import file_selector_macos import package_info_plus import path_provider_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) + FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) } diff --git a/star_lock/pubspec.yaml b/star_lock/pubspec.yaml index 8b737eb5..acaa1e4b 100644 --- a/star_lock/pubspec.yaml +++ b/star_lock/pubspec.yaml @@ -62,6 +62,9 @@ dependencies: flutter_pickers: ^2.1.9 #万年历 syncfusion_flutter_datepicker: ^22.1.38 + #图片选择 + image_picker: ^1.0.1 + dev_dependencies: flutter_test: sdk: flutter diff --git a/star_lock/windows/flutter/generated_plugin_registrant.cc b/star_lock/windows/flutter/generated_plugin_registrant.cc index 8b6d4680..77ab7a09 100644 --- a/star_lock/windows/flutter/generated_plugin_registrant.cc +++ b/star_lock/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,9 @@ #include "generated_plugin_registrant.h" +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + FileSelectorWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FileSelectorWindows")); } diff --git a/star_lock/windows/flutter/generated_plugins.cmake b/star_lock/windows/flutter/generated_plugins.cmake index b93c4c30..a423a024 100644 --- a/star_lock/windows/flutter/generated_plugins.cmake +++ b/star_lock/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_selector_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST