14 changed files with 299 additions and 274 deletions
Unified View
Diff Options
-
24lib/controller/home/home_controller.dart
-
7lib/controller/mine/edit_info_controller.dart
-
16lib/model/home/marriage_data.dart
-
8lib/model/home/user_info_data.dart
-
4lib/model/mine/user_data.dart
-
181lib/pages/discover/visitor_list_page.dart
-
86lib/pages/home/content_card.dart
-
15lib/pages/home/home_page.dart
-
2lib/pages/home/user_information_page.dart
-
5lib/pages/main/main_page.dart
-
50lib/pages/mine/edit_info_page.dart
-
3lib/pages/mine/mine_page.dart
-
38lib/pages/mine/phone_page.dart
-
134lib/pages/mine/signature_page.dart
@ -1,70 +1,94 @@ |
|||||
import 'package:dating_touchme_app/components/page_appbar.dart'; |
import 'package:dating_touchme_app/components/page_appbar.dart'; |
||||
|
import 'package:dating_touchme_app/controller/mine/edit_info_controller.dart'; |
||||
|
import 'package:dating_touchme_app/extension/ex_widget.dart'; |
||||
import 'package:flutter/material.dart'; |
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
||||
|
import 'package:get/get.dart'; |
||||
|
|
||||
class SignaturePage extends StatefulWidget { |
|
||||
|
class SignaturePage extends StatelessWidget { |
||||
const SignaturePage({super.key}); |
const SignaturePage({super.key}); |
||||
|
|
||||
@override |
|
||||
State<SignaturePage> createState() => _SignaturePageState(); |
|
||||
} |
|
||||
|
|
||||
class _SignaturePageState extends State<SignaturePage> { |
|
||||
|
|
||||
|
|
||||
String message = '拒绝内耗,向阳而生,用热爱抵御岁月漫长,用真诚对待每一次相遇拒绝内耗,向阳而生,用热爱抵御岁月漫长,用真诚对待每一次相遇'; |
|
||||
final TextEditingController _messageController = TextEditingController(); |
|
||||
|
|
||||
@override |
|
||||
void initState() { |
|
||||
super.initState(); |
|
||||
|
|
||||
_messageController.value = TextEditingValue( |
|
||||
text: message, |
|
||||
selection: TextSelection.fromPosition(TextPosition(offset: message.length)), |
|
||||
); |
|
||||
} |
|
||||
|
|
||||
@override |
@override |
||||
Widget build(BuildContext context) { |
Widget build(BuildContext context) { |
||||
return Scaffold( |
|
||||
appBar: PageAppbar(title: "交友心声",), |
|
||||
body: Container( |
|
||||
padding: EdgeInsets.all(17.w), |
|
||||
child: TextField( |
|
||||
controller: _messageController, |
|
||||
maxLength: 50, // 上限 |
|
||||
minLines: 5, // 多行 |
|
||||
maxLines: 5, // 自适应高度 |
|
||||
style: TextStyle( |
|
||||
fontSize: ScreenUtil().setWidth(13), |
|
||||
height: 1 |
|
||||
), |
|
||||
decoration: InputDecoration( |
|
||||
contentPadding: EdgeInsets.symmetric( |
|
||||
vertical: 0, |
|
||||
horizontal: 0 |
|
||||
), |
|
||||
hintText: "请输入交友心声", |
|
||||
|
return GetX<EditInfoController>( |
||||
|
init: EditInfoController(), |
||||
|
builder: (controller) { |
||||
|
return Scaffold( |
||||
|
appBar: PageAppbar(title: "交友心声",), |
||||
|
body: Container( |
||||
|
padding: EdgeInsets.all(17.w), |
||||
|
child: TextField( |
||||
|
controller: controller.messageController.value, |
||||
|
maxLength: 50, // 上限 |
||||
|
minLines: 5, // 多行 |
||||
|
maxLines: 5, // 自适应高度 |
||||
|
style: TextStyle( |
||||
|
fontSize: ScreenUtil().setWidth(13), |
||||
|
height: 1 |
||||
|
), |
||||
|
decoration: InputDecoration( |
||||
|
contentPadding: EdgeInsets.symmetric( |
||||
|
vertical: 0, |
||||
|
horizontal: 0 |
||||
|
), |
||||
|
hintText: "请输入交友心声", |
||||
|
|
||||
border: const OutlineInputBorder( |
|
||||
borderSide: BorderSide.none, // 这将移除边框 // 可选:设置圆角 |
|
||||
), |
|
||||
// 如果你希望聚焦时和未聚焦时都没有边框,也可以设置 focusedBorder 和 enabledBorder |
|
||||
focusedBorder: const OutlineInputBorder( |
|
||||
borderSide: BorderSide.none, |
|
||||
borderRadius: BorderRadius.all(Radius.circular(8.0)), |
|
||||
), |
|
||||
enabledBorder: const OutlineInputBorder( |
|
||||
borderSide: BorderSide.none, |
|
||||
borderRadius: BorderRadius.all(Radius.circular(8.0)), |
|
||||
|
border: const OutlineInputBorder( |
||||
|
borderSide: BorderSide.none, // 这将移除边框 // 可选:设置圆角 |
||||
|
), |
||||
|
// 如果你希望聚焦时和未聚焦时都没有边框,也可以设置 focusedBorder 和 enabledBorder |
||||
|
focusedBorder: const OutlineInputBorder( |
||||
|
borderSide: BorderSide.none, |
||||
|
borderRadius: BorderRadius.all(Radius.circular(8.0)), |
||||
|
), |
||||
|
enabledBorder: const OutlineInputBorder( |
||||
|
borderSide: BorderSide.none, |
||||
|
borderRadius: BorderRadius.all(Radius.circular(8.0)), |
||||
|
), |
||||
|
), |
||||
|
onChanged: (value){ |
||||
|
controller.message.value = value; |
||||
|
print(value); |
||||
|
}, |
||||
), |
), |
||||
), |
), |
||||
onChanged: (value){ |
|
||||
message = value; |
|
||||
}, |
|
||||
), |
|
||||
), |
|
||||
|
bottomNavigationBar: Container( |
||||
|
margin: EdgeInsets.only(bottom: 30.w), |
||||
|
child: Container( |
||||
|
width: 350.w, |
||||
|
height: 45.w, |
||||
|
decoration: BoxDecoration( |
||||
|
borderRadius: BorderRadius.all(Radius.circular(45.w)), |
||||
|
gradient: LinearGradient( |
||||
|
begin: Alignment.centerLeft, // 90deg: 从左到右 |
||||
|
end: Alignment.centerRight, |
||||
|
colors: [ |
||||
|
Color.fromRGBO(131, 89, 255, 1), // 起点颜色 |
||||
|
Color.fromRGBO(77, 127, 231, 1), // 中间颜色 |
||||
|
Color.fromRGBO(61, 138, 224, 1), // 终点颜色 |
||||
|
], |
||||
|
stops: [0.0, 0.7753, 1.0], // 对应 0%、77.53%、100% |
||||
|
), |
||||
|
), |
||||
|
child: Center( |
||||
|
child: Text( |
||||
|
"保存", |
||||
|
style: TextStyle( |
||||
|
fontSize: 18.w, |
||||
|
color: Colors.white, |
||||
|
fontWeight: FontWeight.w500 |
||||
|
), |
||||
|
), |
||||
|
), |
||||
|
).onTap(() async { |
||||
|
controller.savaDescribeInfo(); |
||||
|
}), |
||||
|
), |
||||
|
); |
||||
|
}, |
||||
); |
); |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
|
|
||||
Write
Preview
Loading…
Cancel
Save