123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
- import 'package:vitalapp/components/cell.dart';
- import 'package:vitalapp/components/dialog_input.dart';
- import 'package:vitalapp/pages/patient/create/controller.dart';
- class Address extends GetView<CreatePatientController> {
- const Address({super.key});
- @override
- Widget build(BuildContext context) {
- return Column(
- children: [
- VListFormCellGroup(
- children: [
- VListFormCell(
- label: "同步户籍地址到现住地址",
- labelWidth: 250,
- contentWidget: Container(
- child: Obx(
- () => Switch(
- onChanged: (value) {
- controller.onSyncAddressCheckChanged(value);
- },
- value: controller.patientInfomationState.isSyncAddresses,
- ),
- ),
- ),
- ),
- Obx(
- () => VListFormCell(
- label: "户籍地址",
- content:
- controller.patientInfomationState.permanentResidenceAddress,
- onTap: () async {
- final result = await VDialogInput(
- title: "户籍地址",
- initialValue: controller
- .patientInfomationState.permanentResidenceAddress,
- placeholder: "请填写户籍地址",
- ).show();
- if (result != null) {
- controller.onCensusRegisterChanged(result);
- }
- },
- ),
- ),
- Obx(
- () => VListFormCell(
- label: "现住地址",
- content: controller.patientInfomationState.address,
- onTap: () async {
- final result = await VDialogInput(
- title: "现住地址",
- initialValue: controller.patientInfomationState.address,
- placeholder: "请填写现住地址",
- ).show();
- if (result != null) {
- controller.patientInfomationState.address = result;
- }
- },
- ),
- ),
- ],
- ),
- ],
- );
- }
- }
|