add disable field in read only mode
This commit is contained in:
@@ -93,6 +93,7 @@ class _MyTextFieldState extends State<MyTextField> {
|
|||||||
controller: widget.controller,
|
controller: widget.controller,
|
||||||
focusNode: _focus,
|
focusNode: _focus,
|
||||||
readOnly: makeEditable(),
|
readOnly: makeEditable(),
|
||||||
|
enabled: !makeEditable(),
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
onChanged: (_) => setState(() {
|
onChanged: (_) => setState(() {
|
||||||
startup = false;
|
startup = false;
|
||||||
@@ -109,6 +110,12 @@ class _MyTextFieldState extends State<MyTextField> {
|
|||||||
//errorBorder: const InputBorder(),
|
//errorBorder: const InputBorder(),
|
||||||
//hintText: hintText,
|
//hintText: hintText,
|
||||||
//hintStyle: TextStyle(color: Colors.blueGrey[400]),
|
//hintStyle: TextStyle(color: Colors.blueGrey[400]),
|
||||||
|
disabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
|||||||
Reference in New Issue
Block a user