57 lines
1.9 KiB
Dart
Executable File
57 lines
1.9 KiB
Dart
Executable File
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:star_lock/main/lockDetail/lockSet/basicInformation/editLockName/editLockName_state.dart';
|
|
|
|
import '../../../../../app_settings/app_colors.dart';
|
|
import '../../../../../tools/tf_loginInput.dart';
|
|
import '../../../../../tools/titleAppBar.dart';
|
|
import '../../../../../translations/trans_lib.dart';
|
|
import 'editLockName_logic.dart';
|
|
|
|
class EditLockNamePage extends StatefulWidget {
|
|
const EditLockNamePage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<EditLockNamePage> createState() => _EditLockNamePageState();
|
|
}
|
|
|
|
class _EditLockNamePageState extends State<EditLockNamePage> {
|
|
final EditLockNameLogic logic = Get.put(EditLockNameLogic());
|
|
final EditLockNameState state = Get.find<EditLockNameLogic>().state;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: AppColors.mainBackgroundColor,
|
|
appBar: TitleAppBar(
|
|
barTitle: '修改名称'.tr,
|
|
haveBack: true,
|
|
backgroundColor: AppColors.mainColor,
|
|
actionsList: <Widget>[
|
|
TextButton(
|
|
child: Text(
|
|
'保存'.tr,
|
|
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
|
),
|
|
onPressed: logic.modifyKeyNameRequest,
|
|
),
|
|
],
|
|
),
|
|
body: Container(
|
|
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
|
child: LoginInput(
|
|
controller: state.changeLockNameController,
|
|
leftWidget: const SizedBox(),
|
|
hintText: '请输入名称'.tr,
|
|
isHaveLeftWidget: true,
|
|
isSuffixIcon: true,
|
|
inputFormatters: <TextInputFormatter>[
|
|
LengthLimitingTextInputFormatter(50),
|
|
]),
|
|
));
|
|
}
|
|
}
|