123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
- import 'package:vnoteapp/components/appbar.dart';
- import 'package:vnoteapp/pages/check/follow_up/widgets/follow_up_from.dart';
- import 'package:vnoteapp/pages/check/widgets/check_category_widget.dart';
- import 'package:vnoteapp/pages/check/widgets/configurable_card.dart';
- import 'index.dart';
- class FollowUpPage extends GetView<FollowUpController> {
- const FollowUpPage({Key? key}) : super(key: key);
- @override
- Widget build(BuildContext context) {
- return GetBuilder<FollowUpController>(
- init: FollowUpController(),
- id: "examination",
- builder: (_) => buildFollowUpPage(),
- );
- }
- Widget buildFollowUpPage() {
- return Scaffold(
- backgroundColor: const Color.fromRGBO(238, 238, 238, 1),
- appBar: VAppBar(
- titleWidget: const Text('人群随访'),
- ),
- body: Scrollbar(
- thumbVisibility: true,
- child: SingleChildScrollView(
- child: Container(
- padding: const EdgeInsets.symmetric(
- horizontal: 50,
- vertical: 20,
- ),
- child: buildFollowUpList(),
- ),
- ),
- ),
- );
- }
- Widget buildFollowUpList() {
- 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.createFollowUp(key, templateCode, data);
- Get.back();
- },
- followUpWidget: const FollowUpFrom(),
- ),
- );
- }
- }
|