cor e desabilitar edição dos campos

This commit is contained in:
Reginaldo
2023-04-20 15:37:39 -03:00
parent 348893eef7
commit a2869661b6
10 changed files with 123 additions and 89 deletions

View File

@@ -13,7 +13,7 @@ class InputWithSubtitle extends StatelessWidget {
double widthError;
var controller;
var onChanged;
bool enable;
bool enabled;
bool mandatory;
TextInputType textInputType;
int maxLines;
@@ -29,7 +29,7 @@ class InputWithSubtitle extends StatelessWidget {
required this.widthInput,
required this.controller,
this.typeInput = 'normal',
this.enable = true,
this.enabled = true,
this.mandatory = true,
this.textInputType = TextInputType.text,
this.maxLines = 1,
@@ -58,14 +58,14 @@ class InputWithSubtitle extends StatelessWidget {
width: widthInput,
hint: hintInput,
label: labelInput,
enable: enable,
enabled: enabled,
textInputType: textInputType,
maxLines:maxLines,
colorBorder: colorBorder,
onChanged: onChanged,
),
typeInput=='normal'&& controller.text=='' &&(enable&&mandatory)?ErrorDefault(widthDefault: widthError,error: errorInput,):Container(),
typeInput!='normal'&&(enable&&mandatory)&& errorInput!=''?ErrorDefault(widthDefault: widthError,error: errorInput,):Container(),
typeInput=='normal'&& controller.text=='' &&(enabled&&mandatory)?ErrorDefault(widthDefault: widthError,error: errorInput,):Container(),
typeInput!='normal'&&(enabled&&mandatory)&& errorInput!=''?ErrorDefault(widthDefault: widthError,error: errorInput,):Container(),
Divider(color: ColorPalette.black54,height: 5,endIndent: 10,)
],
);