mine_page.dart 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/services.dart';
  3. import 'package:shuqi/public.dart';
  4. import 'me_header.dart';
  5. import '../setting_page.dart';
  6. import 'me_cell.dart';
  7. /// Description: 我的页面
  8. /// Time : 10/10/2023 Tuesday
  9. /// Author : liuyuqi.gov@msn.cn
  10. class MinePage extends StatelessWidget {
  11. Widget buildCells(BuildContext context) {
  12. return Container(
  13. child: Column(
  14. children: <Widget>[
  15. MeCell(
  16. title: '钱包',
  17. iconName: 'assets/img/me_wallet.png',
  18. onPressed: () {},
  19. ),
  20. MeCell(
  21. title: '消费充值记录',
  22. iconName: 'assets/img/me_record.png',
  23. onPressed: () {},
  24. ),
  25. MeCell(
  26. title: '购买的书',
  27. iconName: 'assets/img/me_buy.png',
  28. onPressed: () {},
  29. ),
  30. MeCell(
  31. title: '我的会员',
  32. iconName: 'assets/img/me_vip.png',
  33. onPressed: () {},
  34. ),
  35. MeCell(
  36. title: '绑兑换码',
  37. iconName: 'assets/img/me_coupon.png',
  38. onPressed: () {},
  39. ),
  40. MeCell(
  41. title: '阅读之约',
  42. iconName: 'assets/img/me_date.png',
  43. onPressed: () {},
  44. ),
  45. MeCell(
  46. title: '我的收藏',
  47. iconName: 'assets/img/me_favorite.png',
  48. onPressed: () {},
  49. ),
  50. MeCell(
  51. title: '设置',
  52. iconName: 'assets/img/me_setting.png',
  53. onPressed: () {
  54. Navigator.push(context, MaterialPageRoute(builder: (context) {
  55. return SettingPage();
  56. }));
  57. },
  58. ),
  59. MeCell(
  60. title: 'Flutter版 书旗小说',
  61. iconName: 'assets/img/me_feedback.png',
  62. onPressed: () {
  63. AppNavigator.pushWeb(context, 'https://github.com/huanxsd/flutter_shuqi', 'Flutter');
  64. },
  65. ),
  66. MeCell(
  67. title: 'SwiftUI版 书旗小说',
  68. iconName: 'assets/img/me_action.png',
  69. onPressed: () {
  70. AppNavigator.pushWeb(context, 'https://github.com/huanxsd/swiftui-shuqi-reader', 'SwiftUI');
  71. },
  72. ),
  73. ],
  74. ),
  75. );
  76. }
  77. @override
  78. Widget build(BuildContext context) {
  79. return Scaffold(
  80. body: AnnotatedRegion(
  81. value: SystemUiOverlayStyle.dark,
  82. child: Container(
  83. color: Colors.white,
  84. child: ListView(
  85. children: <Widget>[
  86. MeHeader(),
  87. SizedBox(height: 10),
  88. buildCells(context),
  89. ],
  90. ),
  91. ),
  92. ),
  93. );
  94. }
  95. }