12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
- import 'package:vnoteapp/components/cell.dart';
- import 'package:vnoteapp/components/dialog_input.dart';
- import 'package:vnoteapp/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.state.isSyncAddresses,
- ),
- ),
- ),
- ),
- Obx(
- () => VListFormCell(
- label: "户籍地址",
- content: controller.state.censusRegister,
- onTap: () async {
- final result = await VDialogInput(
- title: "户籍地址",
- initialValue: controller.state.censusRegister,
- placeholder: "请填写户籍地址",
- ).show();
- if (result != null) {
- controller.onCensusRegisterChanged(result);
- }
- },
- ),
- ),
- Obx(
- () => VListFormCell(
- label: "现住地址",
- content: controller.state.address,
- onTap: () async {
- final result = await VDialogInput(
- title: "现住地址",
- initialValue: controller.state.address,
- placeholder: "请填写现住地址",
- ).show();
- if (result != null) {
- controller.state.address = result;
- }
- },
- ),
- ),
- ],
- ),
- ],
- );
- }
- }
|