Closed developer82 closed 9 months ago
May be you could try it like this:
PlatformTextFormField(
hintText: 'hint',
validator: (value) =>
(value?.length ?? 0) < 3 ? 'Not enough' : null,
autovalidateMode: AutovalidateMode.always,
+ material: (_, __) => MaterialTextFormFieldData(
+ decoration:
+ ...
+ ),
+ cupertino: (_, __) => CupertinoTextFormFieldData(
+ decoration:
+ ...
+ ),
),
As @bookshiyi states you need to use the material
and cupertino
fields since they use different types. InputDecoration
for material and BoxDecoration
for cupertino
I see that most of the TextFormField properties I expect to find are there, but decoration isn't, but I do need to apply my own decoration.