|
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|
|
import 'package:get/get.dart';
|
|
|
import 'package:vnoteapp/architecture/utils/prompt_box.dart';
|
|
|
import 'package:vnoteapp/components/appbar.dart';
|
|
|
+import 'package:vnoteapp/components/button.dart';
|
|
|
import 'package:vnoteapp/pages/patient/info/widgets/base.dart';
|
|
|
|
|
|
import 'controller.dart';
|
|
@@ -23,29 +24,27 @@ class PatientInfoPage extends GetView<PatientInfoController> {
|
|
|
style: const TextStyle(fontSize: 24),
|
|
|
),
|
|
|
),
|
|
|
- actions: [
|
|
|
- TextButton(
|
|
|
- onPressed: () async {
|
|
|
- var result = await controller.updatePatientAsync();
|
|
|
- if (result) {
|
|
|
- PromptBox.toast("保存成功");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- PromptBox.toast("保存失败");
|
|
|
- }
|
|
|
- },
|
|
|
- child: const Text(
|
|
|
- "保存",
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.white,
|
|
|
- fontSize: 32,
|
|
|
- fontWeight: FontWeight.bold,
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- const SizedBox(width: 8),
|
|
|
- ],
|
|
|
+ // actions: [
|
|
|
+ // TextButton(
|
|
|
+ // onPressed: () async {
|
|
|
+ // var result = await controller.updatePatientAsync();
|
|
|
+ // if (result) {
|
|
|
+ // PromptBox.toast("保存成功");
|
|
|
+ // } else {
|
|
|
+ // PromptBox.toast("保存失败");
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // child: const Text(
|
|
|
+ // "保存",
|
|
|
+ // style: TextStyle(
|
|
|
+ // color: Colors.white,
|
|
|
+ // fontSize: 32,
|
|
|
+ // fontWeight: FontWeight.bold,
|
|
|
+ // ),
|
|
|
+ // ),
|
|
|
+ // ),
|
|
|
+ // const SizedBox(width: 8),
|
|
|
+ // ],
|
|
|
),
|
|
|
body: Padding(
|
|
|
padding: const EdgeInsets.only(top: 2),
|
|
@@ -166,11 +165,36 @@ class _NavWidget extends GetView<PatientInfoController> {
|
|
|
color: Colors.white,
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
),
|
|
|
- child: Obx(() {
|
|
|
- final builder = _pageBuilders[controller.state.anchor];
|
|
|
- if (builder != null) return builder(context);
|
|
|
- return const Center(child: Text("Unknown"));
|
|
|
- }),
|
|
|
+ child: Stack(
|
|
|
+ children: [
|
|
|
+ Obx(() {
|
|
|
+ final builder = _pageBuilders[controller.state.anchor];
|
|
|
+ if (builder != null) return builder(context);
|
|
|
+ return const Center(child: Text("Unknown"));
|
|
|
+ }),
|
|
|
+ Positioned(
|
|
|
+ bottom: 8,
|
|
|
+ left: 200,
|
|
|
+ right: 200,
|
|
|
+ child: Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
+ children: [
|
|
|
+ VButton(
|
|
|
+ label: "保存信息",
|
|
|
+ onTap: () async {
|
|
|
+ var result = await controller.updatePatientAsync();
|
|
|
+ if (result) {
|
|
|
+ PromptBox.toast("保存成功");
|
|
|
+ } else {
|
|
|
+ PromptBox.toast("保存失败");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
);
|
|
|
}
|
|
|
}
|