import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import '../../../app_settings/app_colors.dart'; import '../../../tools/submitBtn.dart'; import '../../../tools/titleAppBar.dart'; import '../../../translations/trans_lib.dart'; import 'saveLock_logic.dart'; class SaveLockPage extends StatefulWidget { const SaveLockPage({Key? key}) : super(key: key); @override State createState() => _SaveLockPageState(); } class _SaveLockPageState extends State { final logic = Get.put(SaveLockLogic()); final state = Get.find().state; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor), body: Column( // mainAxisAlignment: MainAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center, children: [ SizedBox(height: 80.h,), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Text(TranslationLoader.lanKeys!.addSuccessfullyPleaseRename!.tr, style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500),), ], ), SizedBox(height: 80.h,), Container( height: 80.h, // color: Colors.red, padding: EdgeInsets.only(left: 50.w, right: 50.w), child: TextField( controller: state.aliNameController, onChanged: (v){ state.aliName.value = v; }, textAlign:TextAlign.center, inputFormatters: [ LengthLimitingTextInputFormatter(32), ], // style:TextStyle(height: 1.1, fontSize: 36.sp, fontWeight: FontWeight.w400, color:AppColors.mainColor), decoration: InputDecoration( hintText: '请填写信息', hintStyle: TextStyle( // height: 1.1, fontSize: 24.sp, fontWeight: FontWeight.w400, color: const Color(0xFF999999) ), border: OutlineInputBorder( ///设置边框四个角的弧度 borderRadius: BorderRadius.all(Radius.circular(50.h)), ///用来配置边框的样式 borderSide: BorderSide( ///设置边框的颜色 color: AppColors.mainColor, ///设置边框的粗细 width: 1, ), ), ///用来配置输入框获取焦点时的颜色 focusedBorder: OutlineInputBorder( ///设置边框四个角的弧度 borderRadius: BorderRadius.all(Radius.circular(50.h)), ///用来配置边框的样式 borderSide: BorderSide( ///设置边框的颜色 color: AppColors.mainColor, ///设置边框的粗细 width: 1, ), ), ) ), ), SizedBox(height: 120.h,), SubmitBtn( btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, margin: EdgeInsets.only( left: 50.w, right: 50.w, top: 30.w, bottom: 30.w ), padding: EdgeInsets.only( top: 25.w, bottom: 25.w ), onClick: (){ // Navigator.pop(context); logic.saveLockAction(); } ), ], ) ); } }