me_scene.dart 2.5 KB

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