15 changed files with 2402 additions and 374 deletions
Split View
Diff Options
-
9android/app/src/main/AndroidManifest.xml
-
BINassets/rose_banner.png
-
826lib/pages/edit_info_page.dart
-
170lib/pages/live_room_page.dart
-
179lib/pages/message_page.dart
-
194lib/pages/message_setting_page.dart
-
113lib/pages/my_page.dart
-
162lib/pages/pay_history_page.dart
-
443lib/pages/report_page.dart
-
395lib/pages/rose_page.dart
-
4lib/pages/signature_page.dart
-
239lib/pages/tag_setting_page.dart
-
2lib/pages/user_info_page.dart
-
30lib/router/app_router.dart
-
10lib/router/route_paths.dart
@ -0,0 +1,194 @@ |
|||
import 'package:dating_touchme_app/components/page_appbar.dart'; |
|||
import 'package:flutter/material.dart'; |
|||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|||
import 'package:tdesign_flutter/tdesign_flutter.dart'; |
|||
|
|||
class MessageSettingPage extends StatefulWidget { |
|||
const MessageSettingPage({super.key}); |
|||
|
|||
@override |
|||
State<MessageSettingPage> createState() => _MessageSettingPageState(); |
|||
} |
|||
|
|||
class _MessageSettingPageState extends State<MessageSettingPage> { |
|||
|
|||
|
|||
bool blockUser = false; |
|||
|
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return Scaffold( |
|||
appBar: PageAppbar(title: "聊天设置",), |
|||
body: SingleChildScrollView( |
|||
child: Container( |
|||
padding: EdgeInsets.only( |
|||
top: 26.w, |
|||
right: 41.w, |
|||
left: 30.w |
|||
), |
|||
child: Column( |
|||
children: [ |
|||
Container( |
|||
padding: EdgeInsets.only( |
|||
bottom: 30.w |
|||
), |
|||
decoration: BoxDecoration( |
|||
border: Border( |
|||
bottom: BorderSide( |
|||
width: 1, |
|||
color: const Color.fromRGBO(245, 245, 245, 1) |
|||
) |
|||
) |
|||
), |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Row( |
|||
children: [ |
|||
ClipRRect( |
|||
borderRadius: BorderRadius.all(Radius.circular(120.w)), |
|||
child: Image.asset( |
|||
"assets/user_avatar.png", |
|||
width: 120.w, |
|||
height: 120.w, |
|||
), |
|||
), |
|||
SizedBox(width: 32.w,), |
|||
Text( |
|||
"林园园", |
|||
style: TextStyle( |
|||
fontSize: 35.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
) |
|||
], |
|||
), |
|||
Icon( |
|||
Icons.keyboard_arrow_right, |
|||
size: 26.w, |
|||
color: const Color.fromRGBO(191, 191, 191, 1) |
|||
) |
|||
], |
|||
), |
|||
), |
|||
Container( |
|||
height: 84.w, |
|||
decoration: BoxDecoration( |
|||
border: Border( |
|||
bottom: BorderSide( |
|||
width: 1, |
|||
color: const Color.fromRGBO(245, 245, 245, 1) |
|||
) |
|||
) |
|||
), |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Text( |
|||
"设置备注名", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
Icon( |
|||
Icons.keyboard_arrow_right, |
|||
size: 26.w, |
|||
color: const Color.fromRGBO(191, 191, 191, 1) |
|||
) |
|||
], |
|||
), |
|||
), |
|||
Container( |
|||
height: 84.w, |
|||
decoration: BoxDecoration( |
|||
border: Border( |
|||
bottom: BorderSide( |
|||
width: 1, |
|||
color: const Color.fromRGBO(245, 245, 245, 1) |
|||
) |
|||
) |
|||
), |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Text( |
|||
"加入黑名单", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
TDSwitch( |
|||
isOn: blockUser, |
|||
trackOnColor: const Color.fromRGBO(117, 98, 249, 1), |
|||
onChanged: (bool e){ |
|||
print(e); |
|||
blockUser = e; |
|||
setState(() { |
|||
|
|||
}); |
|||
return e; |
|||
}, |
|||
), |
|||
], |
|||
), |
|||
), |
|||
Container( |
|||
height: 84.w, |
|||
decoration: BoxDecoration( |
|||
border: Border( |
|||
bottom: BorderSide( |
|||
width: 1, |
|||
color: const Color.fromRGBO(245, 245, 245, 1) |
|||
) |
|||
) |
|||
), |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Text( |
|||
"举报", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
Icon( |
|||
Icons.keyboard_arrow_right, |
|||
size: 26.w, |
|||
color: const Color.fromRGBO(191, 191, 191, 1) |
|||
) |
|||
], |
|||
), |
|||
), |
|||
SizedBox(height: 30.w ,), |
|||
Container( |
|||
width: 650.w, |
|||
height: 90.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(90.w)), |
|||
color: Color.fromRGBO(117, 98, 249, 1) |
|||
), |
|||
child: Center( |
|||
child: Text( |
|||
"关注", |
|||
style: TextStyle( |
|||
fontSize: 36.w, |
|||
color: Colors.white, |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
), |
|||
) |
|||
], |
|||
), |
|||
), |
|||
), |
|||
); |
|||
} |
|||
} |
|||
@ -0,0 +1,162 @@ |
|||
import 'package:dating_touchme_app/components/page_appbar.dart'; |
|||
import 'package:flutter/material.dart'; |
|||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|||
|
|||
class PayHistoryPage extends StatefulWidget { |
|||
const PayHistoryPage({super.key}); |
|||
|
|||
@override |
|||
State<PayHistoryPage> createState() => _PayHistoryPageState(); |
|||
} |
|||
|
|||
class _PayHistoryPageState extends State<PayHistoryPage> { |
|||
|
|||
|
|||
|
|||
List<String> friendNavList = ["赠送记录", "收支详情", "聊天券记录"]; |
|||
|
|||
int friendNavActive = 0; |
|||
|
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return Scaffold( |
|||
appBar: PageAppbar(title: "交易记录"), |
|||
body: SingleChildScrollView( |
|||
child: Container( |
|||
padding: EdgeInsets.symmetric( |
|||
vertical: 12.w, |
|||
horizontal: 30.w |
|||
), |
|||
child: Column( |
|||
children: [ |
|||
Row( |
|||
children: [ |
|||
...friendNavList.asMap().entries.map((entry){ |
|||
return Container( |
|||
margin: EdgeInsets.only(right: 50.w), |
|||
child: InkWell( |
|||
onTap: (){ |
|||
friendNavActive = entry.key; |
|||
setState(() { |
|||
|
|||
}); |
|||
}, |
|||
child: Container( |
|||
padding: entry.key == friendNavActive ? EdgeInsets.symmetric(vertical: 5.w, horizontal: 26.w) : EdgeInsets.zero, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(43.w)), |
|||
color: entry.key == friendNavActive ? const Color.fromRGBO(117, 98, 249, 1) : Colors.transparent |
|||
), |
|||
child: Text( |
|||
entry.value, |
|||
style: TextStyle( |
|||
fontSize: 24.w, |
|||
color: entry.key == friendNavActive ? Colors.white : const Color.fromRGBO(51, 51, 51, .7), |
|||
fontWeight: entry.key == friendNavActive ? FontWeight.w700 : FontWeight.w500 |
|||
), |
|||
), |
|||
), |
|||
), |
|||
); |
|||
}), |
|||
|
|||
], |
|||
), |
|||
SizedBox(height: 8.w,), |
|||
SendItem(), |
|||
SendItem(), |
|||
SendItem(), |
|||
SendItem(), |
|||
SendItem(), |
|||
SizedBox(height: 13.w,), |
|||
Text( |
|||
"没有更多了", |
|||
style: TextStyle( |
|||
fontSize: 22.w, |
|||
color: const Color.fromRGBO(144, 144, 144, 1), |
|||
), |
|||
) |
|||
], |
|||
), |
|||
), |
|||
), |
|||
); |
|||
} |
|||
} |
|||
|
|||
class SendItem extends StatefulWidget { |
|||
const SendItem({super.key}); |
|||
|
|||
@override |
|||
State<SendItem> createState() => _SendItemState(); |
|||
} |
|||
|
|||
class _SendItemState extends State<SendItem> { |
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return Container( |
|||
height: 140.w, |
|||
decoration: BoxDecoration( |
|||
border: Border( |
|||
bottom: BorderSide( |
|||
width: 1, |
|||
color: const Color.fromRGBO(219, 219, 219, 1) |
|||
) |
|||
) |
|||
), |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Row( |
|||
children: [ |
|||
Container( |
|||
width: 81.w, |
|||
height: 81.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(81.w)), |
|||
color: const Color.fromRGBO(237, 237, 237, 1) |
|||
), |
|||
child: Center( |
|||
child: Image.asset( |
|||
"assets/rose_gift.png", |
|||
width: 55.w, |
|||
height: 55.w, |
|||
), |
|||
), |
|||
), |
|||
SizedBox(width: 25.w,), |
|||
Column( |
|||
crossAxisAlignment: CrossAxisAlignment.start, |
|||
mainAxisAlignment: MainAxisAlignment.center, |
|||
children: [ |
|||
Text( |
|||
"视频详情直播间送礼物", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
Text( |
|||
"2025-11-03 17:55:55", |
|||
style: TextStyle( |
|||
fontSize: 22.w, |
|||
color: const Color.fromRGBO(144, 144, 144, 1), |
|||
), |
|||
) |
|||
], |
|||
) |
|||
], |
|||
), |
|||
Text( |
|||
"-1支", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(227, 84, 84, 1) |
|||
), |
|||
) |
|||
], |
|||
), |
|||
); |
|||
} |
|||
} |
|||
@ -0,0 +1,443 @@ |
|||
import 'package:dating_touchme_app/components/page_appbar.dart'; |
|||
import 'package:flutter/material.dart'; |
|||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|||
import 'package:roundcheckbox/roundcheckbox.dart'; |
|||
import 'package:tdesign_flutter/tdesign_flutter.dart'; |
|||
|
|||
class ReportPage extends StatefulWidget { |
|||
const ReportPage({super.key}); |
|||
|
|||
@override |
|||
State<ReportPage> createState() => _ReportPageState(); |
|||
} |
|||
|
|||
class _ReportPageState extends State<ReportPage> { |
|||
|
|||
int checked = 0; |
|||
|
|||
String message = ''; |
|||
|
|||
bool blockUser = false; |
|||
|
|||
final TextEditingController _messageController = TextEditingController(); |
|||
|
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return Scaffold( |
|||
appBar: PageAppbar(title: "举报中心",), |
|||
body: SingleChildScrollView( |
|||
child: Container( |
|||
padding: EdgeInsets.only( |
|||
top: 12.w, |
|||
right: 20.w, |
|||
left: 40.w |
|||
), |
|||
child: Column( |
|||
children: [ |
|||
Row( |
|||
mainAxisAlignment: MainAxisAlignment.start, |
|||
children: [ |
|||
Text( |
|||
"请选择举报的原因", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(144, 144, 144, 1) |
|||
), |
|||
), |
|||
], |
|||
), |
|||
SizedBox(height: 19.w ,), |
|||
SizedBox( |
|||
height: 65.w, |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Text( |
|||
"资料作假", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
RoundCheckBox( |
|||
onTap: (bool? value){ |
|||
checked = 1; |
|||
setState(() { |
|||
|
|||
}); |
|||
}, |
|||
isChecked: checked == 1, |
|||
size: ScreenUtil().setWidth(36), |
|||
checkedColor: const Color.fromRGBO(117, 98, 249, 1), |
|||
checkedWidget: Icon( |
|||
Icons.check, |
|||
color: const Color.fromRGBO(255, 255, 255, 1), |
|||
size: ScreenUtil().setWidth(15), |
|||
), |
|||
), |
|||
], |
|||
), |
|||
), |
|||
SizedBox( |
|||
height: 65.w, |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Text( |
|||
"色情低俗", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
RoundCheckBox( |
|||
onTap: (bool? value){ |
|||
checked = 2; |
|||
setState(() { |
|||
|
|||
}); |
|||
}, |
|||
isChecked: checked == 2, |
|||
size: ScreenUtil().setWidth(36), |
|||
checkedColor: const Color.fromRGBO(117, 98, 249, 1), |
|||
checkedWidget: Icon( |
|||
Icons.check, |
|||
color: const Color.fromRGBO(255, 255, 255, 1), |
|||
size: ScreenUtil().setWidth(15), |
|||
), |
|||
), |
|||
], |
|||
), |
|||
), |
|||
SizedBox( |
|||
height: 65.w, |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Text( |
|||
"涉政/涉独", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
RoundCheckBox( |
|||
onTap: (bool? value){ |
|||
checked = 3; |
|||
setState(() { |
|||
|
|||
}); |
|||
}, |
|||
isChecked: checked == 3, |
|||
size: ScreenUtil().setWidth(36), |
|||
checkedColor: const Color.fromRGBO(117, 98, 249, 1), |
|||
checkedWidget: Icon( |
|||
Icons.check, |
|||
color: const Color.fromRGBO(255, 255, 255, 1), |
|||
size: ScreenUtil().setWidth(15), |
|||
), |
|||
), |
|||
], |
|||
), |
|||
), |
|||
SizedBox( |
|||
height: 65.w, |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Text( |
|||
"违法违禁", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
RoundCheckBox( |
|||
onTap: (bool? value){ |
|||
checked = 4; |
|||
setState(() { |
|||
|
|||
}); |
|||
}, |
|||
isChecked: checked == 4, |
|||
size: ScreenUtil().setWidth(36), |
|||
checkedColor: const Color.fromRGBO(117, 98, 249, 1), |
|||
checkedWidget: Icon( |
|||
Icons.check, |
|||
color: const Color.fromRGBO(255, 255, 255, 1), |
|||
size: ScreenUtil().setWidth(15), |
|||
), |
|||
), |
|||
], |
|||
), |
|||
), |
|||
SizedBox( |
|||
height: 65.w, |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Text( |
|||
"未成年相关", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
RoundCheckBox( |
|||
onTap: (bool? value){ |
|||
checked = 5; |
|||
setState(() { |
|||
|
|||
}); |
|||
}, |
|||
isChecked: checked == 5, |
|||
size: ScreenUtil().setWidth(36), |
|||
checkedColor: const Color.fromRGBO(117, 98, 249, 1), |
|||
checkedWidget: Icon( |
|||
Icons.check, |
|||
color: const Color.fromRGBO(255, 255, 255, 1), |
|||
size: ScreenUtil().setWidth(15), |
|||
), |
|||
), |
|||
], |
|||
), |
|||
), |
|||
SizedBox( |
|||
height: 65.w, |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Text( |
|||
"欺诈/广告/引导第三方交易", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
RoundCheckBox( |
|||
onTap: (bool? value){ |
|||
checked = 6; |
|||
setState(() { |
|||
|
|||
}); |
|||
}, |
|||
isChecked: checked == 6, |
|||
size: ScreenUtil().setWidth(36), |
|||
checkedColor: const Color.fromRGBO(117, 98, 249, 1), |
|||
checkedWidget: Icon( |
|||
Icons.check, |
|||
color: const Color.fromRGBO(255, 255, 255, 1), |
|||
size: ScreenUtil().setWidth(15), |
|||
), |
|||
), |
|||
], |
|||
), |
|||
), |
|||
SizedBox( |
|||
height: 65.w, |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Text( |
|||
"恶意骚扰/侮辱谩骂", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
RoundCheckBox( |
|||
onTap: (bool? value){ |
|||
checked = 7; |
|||
setState(() { |
|||
|
|||
}); |
|||
}, |
|||
isChecked: checked == 7, |
|||
size: ScreenUtil().setWidth(36), |
|||
checkedColor: const Color.fromRGBO(117, 98, 249, 1), |
|||
checkedWidget: Icon( |
|||
Icons.check, |
|||
color: const Color.fromRGBO(255, 255, 255, 1), |
|||
size: ScreenUtil().setWidth(15), |
|||
), |
|||
), |
|||
], |
|||
), |
|||
), |
|||
SizedBox( |
|||
height: 65.w, |
|||
child: Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Text( |
|||
"其他", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
RoundCheckBox( |
|||
onTap: (bool? value){ |
|||
checked = 8; |
|||
setState(() { |
|||
|
|||
}); |
|||
}, |
|||
isChecked: checked == 8, |
|||
size: ScreenUtil().setWidth(36), |
|||
checkedColor: const Color.fromRGBO(117, 98, 249, 1), |
|||
checkedWidget: Icon( |
|||
Icons.check, |
|||
color: const Color.fromRGBO(255, 255, 255, 1), |
|||
size: ScreenUtil().setWidth(15), |
|||
), |
|||
), |
|||
], |
|||
), |
|||
), |
|||
SizedBox(height: 58.w ,), |
|||
Row( |
|||
mainAxisAlignment: MainAxisAlignment.start, |
|||
children: [ |
|||
Text( |
|||
"图片证据(选填)", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(144, 144, 144, 1) |
|||
), |
|||
), |
|||
], |
|||
), |
|||
SizedBox(height: 26.w ,), |
|||
Row( |
|||
mainAxisAlignment: MainAxisAlignment.start, |
|||
children: [ |
|||
Container( |
|||
width: 160.w, |
|||
height: 160.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(16.w)), |
|||
border: Border.all(width: 1, color: const Color.fromRGBO(224, 224, 224, 1)) |
|||
), |
|||
child: Center( |
|||
child: Icon( |
|||
Icons.add, |
|||
size: 26.w, |
|||
color: const Color.fromRGBO(144, 144, 144, 1), |
|||
), |
|||
), |
|||
) |
|||
], |
|||
), |
|||
SizedBox(height: 30.w ,), |
|||
Row( |
|||
mainAxisAlignment: MainAxisAlignment.start, |
|||
children: [ |
|||
Text( |
|||
"投诉内容(选填)", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(144, 144, 144, 1) |
|||
), |
|||
), |
|||
], |
|||
), |
|||
Container( |
|||
padding: EdgeInsets.all(35.w), |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(16.w)), |
|||
border: Border.all(width: 1, color: const Color.fromRGBO(224, 224, 224, 1)) |
|||
), |
|||
child: TextField( |
|||
controller: _messageController, |
|||
minLines: 3, // 多行 |
|||
maxLines: 3, // 自适应高度 |
|||
style: TextStyle( |
|||
fontSize: ScreenUtil().setWidth(26), |
|||
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)), |
|||
), |
|||
), |
|||
onChanged: (value){ |
|||
message = value; |
|||
}, |
|||
), |
|||
), |
|||
SizedBox(height: 32.w ,), |
|||
Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Text( |
|||
"同时加入黑名单", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
TDSwitch( |
|||
isOn: blockUser, |
|||
trackOnColor: const Color.fromRGBO(117, 98, 249, 1), |
|||
onChanged: (bool e){ |
|||
print(e); |
|||
blockUser = e; |
|||
setState(() { |
|||
|
|||
}); |
|||
return e; |
|||
}, |
|||
), |
|||
], |
|||
), |
|||
SizedBox(height: 107.w ,), |
|||
Container( |
|||
width: 650.w, |
|||
height: 90.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(90.w)), |
|||
color: Color.fromRGBO(117, 98, 249, checked != 0 ? 1 : .6) |
|||
), |
|||
child: Center( |
|||
child: Text( |
|||
"提交", |
|||
style: TextStyle( |
|||
fontSize: 36.w, |
|||
color: Colors.white, |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
), |
|||
) |
|||
], |
|||
), |
|||
), |
|||
), |
|||
); |
|||
} |
|||
} |
|||
@ -0,0 +1,395 @@ |
|||
import 'package:dating_touchme_app/components/page_appbar.dart'; |
|||
import 'package:dating_touchme_app/router/route_paths.dart'; |
|||
import 'package:flutter/material.dart'; |
|||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|||
import 'package:go_router/go_router.dart'; |
|||
import 'package:roundcheckbox/roundcheckbox.dart'; |
|||
|
|||
class RosePage extends StatefulWidget { |
|||
const RosePage({super.key}); |
|||
|
|||
@override |
|||
State<RosePage> createState() => _RosePageState(); |
|||
} |
|||
|
|||
class _RosePageState extends State<RosePage> { |
|||
|
|||
|
|||
|
|||
|
|||
bool payChecked = true; |
|||
|
|||
int activePay = 0; |
|||
List<Map> payList = [ |
|||
{"num": 10, "price": 10, "hasTag": true}, |
|||
{"num": 60, "price": 60, "hasTag": true}, |
|||
{"num": 300, "price": 60, "hasTag": true}, |
|||
{"num": 1080, "price": 1080, "hasTag": false}, |
|||
{"num": 2880, "price": 2880, "hasTag": false}, |
|||
{"num": 5000, "price": 5000, "hasTag": false}, |
|||
{"num": 10000, "price": 10000, "hasTag": false}, |
|||
{"num": 20000, "price": 20000, "hasTag": false}, |
|||
{"num": 50000, "price": 50000, "hasTag": false}, |
|||
]; |
|||
|
|||
|
|||
|
|||
changePayActive(int index){ |
|||
activePay = index; |
|||
setState(() { |
|||
|
|||
}); |
|||
} |
|||
|
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return Scaffold( |
|||
appBar: PageAppbar(title: "玫瑰充值", right: Container( |
|||
margin: EdgeInsets.only(right: 28.w), |
|||
child: InkWell( |
|||
onTap: (){ |
|||
context.pushNamed(RouteNames.payHistory); |
|||
}, |
|||
child: Text( |
|||
"交易记录", |
|||
style: TextStyle( |
|||
fontSize: 26.w, |
|||
color: const Color.fromRGBO(144, 144, 144, 1), |
|||
), |
|||
), |
|||
), |
|||
),), |
|||
body: SingleChildScrollView( |
|||
child: Container( |
|||
padding: EdgeInsets.symmetric( |
|||
vertical: 20.w, |
|||
horizontal: 25.w |
|||
), |
|||
child: Column( |
|||
children: [ |
|||
Image.asset( |
|||
"assets/rose_banner.png", |
|||
width: 700.w, |
|||
height: 322.w, |
|||
), |
|||
SizedBox(height: 45.w,), |
|||
Row( |
|||
mainAxisAlignment: MainAxisAlignment.start, |
|||
children: [ |
|||
Text( |
|||
"余额:", |
|||
style: TextStyle( |
|||
fontSize: 22.w, |
|||
color: const Color.fromRGBO(144, 144, 144, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
Text( |
|||
"15", |
|||
style: TextStyle( |
|||
fontSize: 32.w, |
|||
color: const Color.fromRGBO(117, 98, 249, 1), |
|||
fontWeight: FontWeight.w700 |
|||
), |
|||
), |
|||
SizedBox(width: 11.w,), |
|||
Image.asset( |
|||
"assets/rose_gift.png", |
|||
width: 26.w, |
|||
height: 26.w, |
|||
) |
|||
], |
|||
), |
|||
|
|||
|
|||
Wrap( |
|||
spacing: 9.w, |
|||
runSpacing: 14.w, |
|||
children: [ |
|||
...payList.asMap().entries.map((entry){ |
|||
return PayItem(item: entry.value, active: activePay, index: entry.key, changeActive: changePayActive); |
|||
}), |
|||
], |
|||
), |
|||
Container( |
|||
height: 1, |
|||
margin: EdgeInsets.only( |
|||
top: 20.w, |
|||
bottom: 30.w |
|||
), |
|||
color: const Color.fromRGBO(219, 219, 219, 1), |
|||
), |
|||
Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Row( |
|||
children: [ |
|||
Image.asset( |
|||
"assets/ali_pay.png", |
|||
width: 35.w, |
|||
height: 35.w, |
|||
), |
|||
SizedBox(width: 12.w,), |
|||
Text( |
|||
"支付宝支付", |
|||
style: TextStyle( |
|||
fontSize: 22.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
) |
|||
], |
|||
), |
|||
RoundCheckBox( |
|||
onTap: (bool? value) { |
|||
setState(() { |
|||
payChecked = true; |
|||
}); |
|||
}, |
|||
isChecked: payChecked, |
|||
size: ScreenUtil().setWidth(30), |
|||
checkedColor: const Color.fromRGBO(117, 98, 249, 1), |
|||
checkedWidget: Icon( |
|||
Icons.check, |
|||
color: const Color.fromRGBO(255, 255, 255, 1), |
|||
size: ScreenUtil().setWidth(14), |
|||
), |
|||
), |
|||
], |
|||
), |
|||
SizedBox(height: 20.w,), |
|||
Row( |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: [ |
|||
Row( |
|||
children: [ |
|||
Image.asset( |
|||
"assets/wechat_pay.png", |
|||
width: 35.w, |
|||
height: 35.w, |
|||
), |
|||
SizedBox(width: 12.w,), |
|||
Text( |
|||
"支付宝支付", |
|||
style: TextStyle( |
|||
fontSize: 22.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
) |
|||
], |
|||
), |
|||
RoundCheckBox( |
|||
onTap: (bool? value) { |
|||
setState(() { |
|||
payChecked = false; |
|||
}); |
|||
}, |
|||
isChecked: !payChecked, |
|||
size: ScreenUtil().setWidth(30), |
|||
checkedColor: const Color.fromRGBO(117, 98, 249, 1), |
|||
checkedWidget: Icon( |
|||
Icons.check, |
|||
color: const Color.fromRGBO(255, 255, 255, 1), |
|||
size: ScreenUtil().setWidth(14), |
|||
), |
|||
), |
|||
], |
|||
), |
|||
SizedBox(height: 17.w,), |
|||
Row( |
|||
children: [ |
|||
RichText( |
|||
text: TextSpan( |
|||
style: TextStyle( |
|||
fontSize: 22.w, |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
children: const [ |
|||
TextSpan( |
|||
text: "充值既代表同意", |
|||
style: TextStyle( |
|||
color: Color.fromRGBO(189, 189, 189, 1) |
|||
) |
|||
), |
|||
TextSpan( |
|||
text: "《动我充值协议》", |
|||
style: TextStyle( |
|||
color: Color.fromRGBO(71, 123, 255, 1) |
|||
) |
|||
), |
|||
TextSpan( |
|||
text: "和隐私政策", |
|||
style: TextStyle( |
|||
color: Color.fromRGBO(189, 189, 189, 1) |
|||
) |
|||
), |
|||
] |
|||
), |
|||
) |
|||
], |
|||
), |
|||
SizedBox(height: 100.w,), |
|||
Container( |
|||
width: 650.w, |
|||
height: 90.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(90.w)), |
|||
gradient: LinearGradient( |
|||
begin: Alignment.centerLeft, // 0%:左边开始 |
|||
end: Alignment.centerRight, // 100%:右边结束 |
|||
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], // 对应 CSS 百分比:0%、77.53%、100% |
|||
), |
|||
), |
|||
child: Center( |
|||
child: Text( |
|||
"立即充值", |
|||
style: TextStyle( |
|||
fontSize: 36.w, |
|||
color: Colors.white, |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
), |
|||
) |
|||
], |
|||
), |
|||
), |
|||
), |
|||
); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
class PayItem extends StatefulWidget { |
|||
final Map item; |
|||
final int active; |
|||
final int index; |
|||
final void Function(int) changeActive; |
|||
const PayItem({super.key, required this.item, required this.active, required this.index, required this.changeActive, }); |
|||
|
|||
@override |
|||
State<PayItem> createState() => _PayItemState(); |
|||
} |
|||
|
|||
class _PayItemState extends State<PayItem> { |
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return InkWell( |
|||
onTap: (){ |
|||
widget.changeActive(widget.index); |
|||
}, |
|||
child: Stack( |
|||
children: [ |
|||
Container( |
|||
width: 227.w, |
|||
height: 110.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(18.w)), |
|||
color: widget.active == widget.index ? const Color.fromRGBO(239, 19, 46, .05) : const Color.fromRGBO(247, 247, 247, 1), |
|||
border: widget.active == widget.index ? Border.all(width: 1, color: const Color.fromRGBO(239, 19, 46, 1)) : null |
|||
), |
|||
child: Column( |
|||
mainAxisAlignment: MainAxisAlignment.center, |
|||
children: [ |
|||
RichText( |
|||
text: TextSpan( |
|||
children: [ |
|||
TextSpan( |
|||
text: "${widget.item["num"]}", |
|||
style: TextStyle( |
|||
fontSize: 35.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w700 |
|||
), |
|||
), |
|||
TextSpan( |
|||
text: "玫瑰", |
|||
style: TextStyle( |
|||
fontSize: 22.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
) |
|||
] |
|||
), |
|||
), |
|||
Text( |
|||
"${widget.item["price"]}元", |
|||
style: TextStyle( |
|||
fontSize: 22.w, |
|||
color: const Color.fromRGBO(144, 144, 144, 144), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
) |
|||
], |
|||
), |
|||
), |
|||
if(widget.item["hasTag"]) Positioned( |
|||
top: 0, |
|||
left: 0, |
|||
child: Container( |
|||
width: 107.w, |
|||
height: 23.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.only( |
|||
topLeft: Radius.circular(18.w), |
|||
bottomRight: Radius.circular(18.w), |
|||
), |
|||
color: widget.active == widget.index ? null :const Color.fromRGBO(238, 24, 50, .1), |
|||
gradient: widget.active == widget.index ? LinearGradient( |
|||
begin: Alignment.centerLeft, // 对应 0% |
|||
end: Alignment.centerRight, // 对应 100% |
|||
colors: [ |
|||
Color.fromRGBO(238, 24, 50, 1), // #EE1832 深红 |
|||
Color.fromRGBO(250, 101, 64, 1), // #FA6540 橙红 |
|||
Color.fromRGBO(255, 131, 69, 1), // #FF8345 浅橙 |
|||
], |
|||
stops: [0.0, 0.7216, 1.0], // 对应 CSS 中的百分比位置 |
|||
) : null, |
|||
), |
|||
child: Center( |
|||
child: Text( |
|||
"送新人大礼包", |
|||
style: TextStyle( |
|||
fontSize: 12.w, |
|||
color: widget.active == widget.index ? Colors.white : const Color.fromRGBO(237, 23, 50, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
), |
|||
), |
|||
), |
|||
if(widget.active == widget.index) Positioned( |
|||
right: 0, |
|||
bottom: 0, |
|||
child: Container( |
|||
width: 35.w, |
|||
height: 26.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.only( |
|||
topLeft: Radius.circular(18.w), |
|||
bottomRight: Radius.circular(18.w), |
|||
), |
|||
color: const Color.fromRGBO(239, 19, 46, 1) |
|||
), |
|||
child: Center( |
|||
child: Image.asset( |
|||
"assets/check.png", |
|||
width: 13.w, |
|||
height: 9.w, |
|||
), |
|||
), |
|||
), |
|||
) |
|||
], |
|||
), |
|||
); |
|||
} |
|||
} |
|||
@ -0,0 +1,239 @@ |
|||
import 'package:dating_touchme_app/components/page_appbar.dart'; |
|||
import 'package:flutter/material.dart'; |
|||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|||
|
|||
class TagSettingPage extends StatefulWidget { |
|||
const TagSettingPage({super.key}); |
|||
|
|||
@override |
|||
State<TagSettingPage> createState() => _TagSettingPageState(); |
|||
} |
|||
|
|||
class _TagSettingPageState extends State<TagSettingPage> { |
|||
|
|||
int active = 0; |
|||
|
|||
List<String> tagNav = [ |
|||
"兴趣爱好", "个人特质", "身份", "经历", "选择状态" |
|||
]; |
|||
|
|||
List<String> tagList = [ |
|||
"K歌", "王者荣耀", "旅行", "艺术生", "电影", |
|||
"喜欢画画", "铲屎官", "足球", "音乐", "吃鸡", |
|||
]; |
|||
|
|||
List<String> selectTagList = [ |
|||
"K歌", "吃鸡", |
|||
]; |
|||
|
|||
changeNav(int i){ |
|||
print(i); |
|||
} |
|||
|
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return Scaffold( |
|||
appBar: PageAppbar(title: "个性标签"), |
|||
body: Column( |
|||
children: [ |
|||
Container( |
|||
height: 54.w, |
|||
color: Colors.white, |
|||
child: Center( |
|||
child: Text( |
|||
"选辉个人标签吸引共同爱好玩伴", |
|||
style: TextStyle( |
|||
fontSize: 22.w, |
|||
color: const Color.fromRGBO(144, 144, 144, 1), |
|||
), |
|||
), |
|||
), |
|||
), |
|||
Expanded( |
|||
child: SingleChildScrollView( |
|||
child: Column( |
|||
children: [ |
|||
Container( |
|||
width: 750.w, |
|||
height: 400.w, |
|||
color: const Color.fromRGBO(250, 250, 250, 1), |
|||
padding: EdgeInsets.symmetric( |
|||
vertical: 46.w, |
|||
horizontal: 34.w |
|||
), |
|||
child: SingleChildScrollView( |
|||
child: Wrap( |
|||
spacing: 30.w, |
|||
runSpacing: 15.w, |
|||
children: [ |
|||
...selectTagList.map((e){ |
|||
return SelectTag(label: e); |
|||
}), |
|||
], |
|||
), |
|||
), |
|||
), |
|||
SizedBox(height: 25.w,), |
|||
Row( |
|||
crossAxisAlignment: CrossAxisAlignment.center, |
|||
mainAxisAlignment: MainAxisAlignment.center, |
|||
children: [ |
|||
...tagNav.asMap().entries.map((entry){ |
|||
return InkWell( |
|||
onTap: (){ |
|||
active = entry.key; |
|||
changeNav(active); |
|||
setState(() { |
|||
|
|||
}); |
|||
}, |
|||
child: Container( |
|||
margin: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(27)), |
|||
child: Column( |
|||
crossAxisAlignment: CrossAxisAlignment.center, |
|||
mainAxisAlignment: MainAxisAlignment.center, |
|||
children: [ |
|||
Text( |
|||
entry.value, |
|||
style: TextStyle( |
|||
fontSize: 27.w, |
|||
color: active == entry.key ? const Color.fromRGBO(51, 51, 51, 1) : const Color.fromRGBO(144, 144, 144, 1), |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
SizedBox(height: ScreenUtil().setWidth(9),), |
|||
if(active == entry.key) Image.asset( |
|||
"assets/home_top_active.png", |
|||
width: ScreenUtil().setWidth(25), |
|||
) |
|||
], |
|||
), |
|||
), |
|||
); |
|||
}), |
|||
|
|||
|
|||
], |
|||
), |
|||
SizedBox(height: 37.w,), |
|||
Container( |
|||
padding: EdgeInsets.symmetric(horizontal: 29.w), |
|||
child: Wrap( |
|||
spacing: 24.w, |
|||
runSpacing: 15.w, |
|||
children: [ |
|||
...tagList.map((e){ |
|||
return TagItem(label: e); |
|||
}), |
|||
], |
|||
), |
|||
), |
|||
SizedBox(height: 300.w,), |
|||
Container( |
|||
width: 650.w, |
|||
height: 90.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(90.w)), |
|||
color: const Color.fromRGBO(117, 98, 249, 1) |
|||
), |
|||
child: Center( |
|||
child: Text( |
|||
"保存(2/10)", |
|||
style: TextStyle( |
|||
fontSize: 36.w, |
|||
color: Colors.white, |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
), |
|||
) |
|||
], |
|||
), |
|||
), |
|||
) |
|||
], |
|||
), |
|||
); |
|||
} |
|||
} |
|||
|
|||
class TagItem extends StatefulWidget { |
|||
final String label; |
|||
const TagItem({super.key, required this.label}); |
|||
|
|||
@override |
|||
State<TagItem> createState() => _TagItemState(); |
|||
} |
|||
|
|||
class _TagItemState extends State<TagItem> { |
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return Container( |
|||
padding: EdgeInsets.symmetric( |
|||
vertical: 5.w, |
|||
horizontal: 23.w |
|||
), |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(50.w)), |
|||
color: const Color.fromRGBO(242, 242, 242, 1) |
|||
), |
|||
child: Text( |
|||
widget.label, |
|||
style: TextStyle( |
|||
fontSize: 28.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1) |
|||
), |
|||
), |
|||
); |
|||
} |
|||
} |
|||
|
|||
class SelectTag extends StatefulWidget { |
|||
final String label; |
|||
const SelectTag({super.key, required this.label}); |
|||
|
|||
@override |
|||
State<SelectTag> createState() => _SelectTagState(); |
|||
} |
|||
|
|||
class _SelectTagState extends State<SelectTag> { |
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return Container( |
|||
padding: EdgeInsets.symmetric( |
|||
vertical: 5.w, |
|||
horizontal: 29.w |
|||
), |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(50.w)), |
|||
color: Colors.white, |
|||
boxShadow: [ |
|||
BoxShadow( |
|||
color: const Color.fromRGBO(0, 0, 0, 0.15), // rgba(0,0,0,0.15) |
|||
offset: const Offset(0, 0), // X=0, Y=0 |
|||
blurRadius: 5.w, // 模糊半径 5px |
|||
spreadRadius: 0, // 默认 0,对应 CSS 默认 |
|||
), |
|||
], |
|||
), |
|||
child: Row( |
|||
mainAxisSize: MainAxisSize.min, |
|||
children: [ |
|||
Text( |
|||
widget.label, |
|||
style: TextStyle( |
|||
fontSize: 28.w, |
|||
color: const Color.fromRGBO(51, 51, 51, 1) |
|||
), |
|||
), |
|||
SizedBox(width: 14.w,), |
|||
Icon( |
|||
Icons.close, |
|||
size: 14.w, |
|||
color: const Color.fromRGBO(207, 207, 207, 1), |
|||
) |
|||
], |
|||
), |
|||
); |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save