From 657a9a48d1361daf1e74f8caa0ea50d0f006949c Mon Sep 17 00:00:00 2001 From: yaso-meth Date: Mon, 29 Jul 2024 16:08:17 +0200 Subject: [PATCH] add disable field in read only mode --- Frontend/patient_manager/lib/components/myTextInput.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Frontend/patient_manager/lib/components/myTextInput.dart b/Frontend/patient_manager/lib/components/myTextInput.dart index 8ae58021..3eb847e0 100644 --- a/Frontend/patient_manager/lib/components/myTextInput.dart +++ b/Frontend/patient_manager/lib/components/myTextInput.dart @@ -93,6 +93,7 @@ class _MyTextFieldState extends State { controller: widget.controller, focusNode: _focus, readOnly: makeEditable(), + enabled: !makeEditable(), obscureText: false, onChanged: (_) => setState(() { startup = false; @@ -109,6 +110,12 @@ class _MyTextFieldState extends State { //errorBorder: const InputBorder(), //hintText: hintText, //hintStyle: TextStyle(color: Colors.blueGrey[400]), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide( + color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + width: 2.0, + ), + ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),