12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- /*
- * @Descripttion:
- * @version:
- * @Author: guanxiaoxin
- * @Date: 2023-09-20 13:29:42
- * @LastEditors: guanxiaoxin
- * @LastEditTime: 2023-10-08 17:14:17
- * @FilePath: \VNoteApp\lib\pages\check\examination\view.dart
- */
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
- import 'package:vnoteapp/components/appbar.dart';
- import 'package:vnoteapp/pages/check/examination/controller.dart';
- import 'package:vnoteapp/pages/check/widgets/check_category_widget.dart';
- import 'package:vnoteapp/pages/check/widgets/configurable_card.dart';
- class ExaminationPage extends GetView<ExaminationController> {
- const ExaminationPage({Key? key}) : super(key: key);
- @override
- Widget build(BuildContext context) {
- return GetBuilder<ExaminationController>(
- init: ExaminationController(),
- id: "examination",
- builder: (_) {
- return Scaffold(
- backgroundColor: const Color.fromRGBO(238, 238, 238, 1),
- appBar: VAppBar(
- titleWidget: const Text('健康体检'),
- ),
- body: Scrollbar(
- thumbVisibility: true,
- child: SingleChildScrollView(
- child: Center(
- child: Container(
- padding: const EdgeInsets.symmetric(vertical: 20),
- child: buildExaminationList(),
- ),
- ),
- ),
- ),
- );
- },
- );
- }
- Widget buildExaminationList() {
- return Wrap(
- spacing: 40,
- runSpacing: 40,
- children: controller.menuList
- .map((e) => CheckCategoryWidget(
- label: e.label,
- assetName: "${e.label}.png",
- onTap: () {
- changePage(e.value);
- },
- ))
- .toList(),
- );
- }
- void changePage(String key) {
- Get.to(
- ConfigurableCard(
- cardKey: key,
- callBack: (key, templateCode, data) async {
- await controller.createExam(key, templateCode, data);
- Get.back();
- },
- patientCode: controller.patientCode,
- ),
- transition: Transition.rightToLeft,
- );
- }
- }
|