Ajuste na validadão de dados do cidadão antes de salvar no banco de dados
This commit is contained in:
@@ -19,6 +19,7 @@ class InputWithSubtitle extends StatelessWidget {
|
||||
TextInputType textInputType;
|
||||
int maxLines;
|
||||
Color colorBorder;
|
||||
String typeInput;
|
||||
|
||||
InputWithSubtitle({
|
||||
required this.subtitle,
|
||||
@@ -28,6 +29,7 @@ class InputWithSubtitle extends StatelessWidget {
|
||||
required this.widthSubtitle,
|
||||
required this.widthInput,
|
||||
required this.controller,
|
||||
this.typeInput = 'normal',
|
||||
this.enable = true,
|
||||
this.mandatory = true,
|
||||
this.textInputType = TextInputType.text,
|
||||
@@ -63,7 +65,8 @@ class InputWithSubtitle extends StatelessWidget {
|
||||
colorBorder: colorBorder,
|
||||
onChanged: onChanged,
|
||||
),
|
||||
controller.text=='' &&(enable&&mandatory)?ErrorDefault(widthDefault: widthError,):Container(),
|
||||
typeInput=='normal'&& controller.text=='' &&(enable&&mandatory)?ErrorDefault(widthDefault: widthError,error: errorInput,):Container(),
|
||||
typeInput!='normal'&&(enable&&mandatory)&& errorInput!=''?ErrorDefault(widthDefault: widthError,error: errorInput,):Container(),
|
||||
Divider(color: ColorPalette.black54,height: 5,endIndent: 10,)
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user