1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
- import 'package:vitalapp/architecture/values/features.dart';
- import 'package:vitalapp/pages/home/controller.dart';
- import 'package:vitalapp/store/store.dart';
- import 'controller.dart';
- import 'widgets/base_info.dart';
- import 'widgets/functions_panel.dart';
- import 'widgets/tag_cards.dart';
- class PatientDetailPage extends GetView<PatientDetailController> {
- const PatientDetailPage({super.key});
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- backgroundColor: Colors.grey.shade200,
- body: Container(
- margin: const EdgeInsets.only(top: 2),
- child: Row(
- children: [
- Container(
- width: 440,
- padding: const EdgeInsets.only(
- left: 12,
- top: 8,
- // right: 8,
- bottom: 8,
- ),
- child: Container(
- padding: const EdgeInsets.only(right: 8),
- child: Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- const BaseInfoCard(),
- const SizedBox(height: 12),
- if (Store.user
- .hasFeature(FeatureKeys.CrowdClassification)) ...[
- const SizedBox(height: 12),
- Expanded(
- child: CrowdLabelsCard(),
- ),
- ],
- if (Store.user.hasFeature(FeatureKeys.ContractStatus)) ...[
- const SizedBox(height: 12),
- const Expanded(child: FollowupTipsCard()),
- ],
- if (Store.user.hasFeature(FeatureKeys.RecentTestRecords))
- FutureBuilder(
- future: controller.onReadLastRecordInfo(),
- builder:
- (BuildContext context, AsyncSnapshot snapshot) {
- return Expanded(
- child: LatestRecordCard(
- connectionState: snapshot.connectionState,
- ),
- );
- },
- ),
- ],
- ),
- ),
- ),
- const Expanded(child: FunctionsPanel()),
- ],
- ),
- ),
- );
- }
- }
|