feedback_page.dart 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import 'package:cs_resources/generated/assets.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:auto_route/auto_route.dart';
  4. import 'package:shared/utils/ext_dart.dart';
  5. import 'package:shared/utils/log_utils.dart';
  6. import 'package:widgets/ext/ex_widget.dart';
  7. import 'package:widgets/my_appbar.dart';
  8. import 'package:widgets/my_load_image.dart';
  9. import 'package:widgets/my_text_view.dart';
  10. import 'package:widgets/shatter/custom_check_box.dart';
  11. import 'package:widgets/shatter/custom_radio_check.dart';
  12. @RoutePage()
  13. class FeedbackPage extends StatelessWidget {
  14. const FeedbackPage({Key? key}) : super(key: key);
  15. @override
  16. Widget build(BuildContext context) {
  17. Log.d("FeedbackPage - build 了");
  18. return Scaffold(
  19. appBar: MyAppBar.appBar(context, "自定义Appbar",backgroundColor: context.theme.primaryColorDark),
  20. body: Center(
  21. child: Column(
  22. mainAxisSize: MainAxisSize.max,
  23. crossAxisAlignment: CrossAxisAlignment.center,
  24. children: [
  25. Text("文本使用").marginOnly(top: 10),
  26. MyTextView(
  27. "推荐使用统一方案管理",
  28. textColor: Colors.black,
  29. isFontMedium: true,
  30. fontSize: 15,
  31. ),
  32. Text("图片的使用").marginOnly(top: 10),
  33. Row(
  34. mainAxisSize: MainAxisSize.max,
  35. mainAxisAlignment: MainAxisAlignment.center,
  36. children: [
  37. MyAssetImage(Assets.baseServicePageNoData, width: 80, height: 80),
  38. MyLoadImage("https://pic.quanjing.com/cz/8s/QJ8856274343.jpg@%21794ws", width: 80, height: 80),
  39. ],
  40. ),
  41. Text("Check/Radio 单选/多选").marginOnly(top: 10),
  42. //真实开发肯定是后台配置,就算写死的也应该在State中定义状态
  43. //多选
  44. CustomCheckBox(
  45. options: ["中文", "英文", "法语"],
  46. onOptionsSelected: (selected) {
  47. Log.d("当前选中的索引:$selected");
  48. },
  49. selectedOptions: ["中文", "英文"],
  50. textColor: Colors.black,
  51. ).marginOnly(left: 15, right: 15, top: 10),
  52. //单选
  53. CustomRadioCheck(
  54. options: ["是", "否"],
  55. onOptionSelected: (index, text) {
  56. Log.d("当前选中的索引:$index");
  57. },
  58. textColor: Colors.black,
  59. selectedPosition: 1,
  60. ).marginOnly(left: 15, right: 15, top: 10),
  61. ElevatedButton(
  62. onPressed: () {},
  63. child: Text('Loading页面状态'),
  64. ).marginOnly(top: 10),
  65. ],
  66. ),
  67. ),
  68. );
  69. }
  70. }