123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- import 'package:cs_resources/generated/assets.dart';
- import 'package:flutter/material.dart';
- import 'package:auto_route/auto_route.dart';
- import 'package:shared/utils/ext_dart.dart';
- import 'package:shared/utils/log_utils.dart';
- import 'package:widgets/ext/ex_widget.dart';
- import 'package:widgets/my_appbar.dart';
- import 'package:widgets/my_load_image.dart';
- import 'package:widgets/my_text_view.dart';
- import 'package:widgets/shatter/custom_check_box.dart';
- import 'package:widgets/shatter/custom_radio_check.dart';
- @RoutePage()
- class FeedbackPage extends StatelessWidget {
- const FeedbackPage({Key? key}) : super(key: key);
- @override
- Widget build(BuildContext context) {
- Log.d("FeedbackPage - build 了");
- return Scaffold(
- appBar: MyAppBar.appBar(context, "自定义Appbar",backgroundColor: context.theme.primaryColorDark),
- body: Center(
- child: Column(
- mainAxisSize: MainAxisSize.max,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Text("文本使用").marginOnly(top: 10),
- MyTextView(
- "推荐使用统一方案管理",
- textColor: Colors.black,
- isFontMedium: true,
- fontSize: 15,
- ),
- Text("图片的使用").marginOnly(top: 10),
- Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- MyAssetImage(Assets.baseServicePageNoData, width: 80, height: 80),
- MyLoadImage("https://pic.quanjing.com/cz/8s/QJ8856274343.jpg@%21794ws", width: 80, height: 80),
- ],
- ),
- Text("Check/Radio 单选/多选").marginOnly(top: 10),
- //真实开发肯定是后台配置,就算写死的也应该在State中定义状态
- //多选
- CustomCheckBox(
- options: ["中文", "英文", "法语"],
- onOptionsSelected: (selected) {
- Log.d("当前选中的索引:$selected");
- },
- selectedOptions: ["中文", "英文"],
- textColor: Colors.black,
- ).marginOnly(left: 15, right: 15, top: 10),
- //单选
- CustomRadioCheck(
- options: ["是", "否"],
- onOptionSelected: (index, text) {
- Log.d("当前选中的索引:$index");
- },
- textColor: Colors.black,
- selectedPosition: 1,
- ).marginOnly(left: 15, right: 15, top: 10),
- ElevatedButton(
- onPressed: () {},
- child: Text('Loading页面状态'),
- ).marginOnly(top: 10),
- ],
- ),
- ),
- );
- }
- }
|