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

@@ -35,7 +35,7 @@ class DropDownButtonDefault extends StatelessWidget {
child: DropdownButton(
hint: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: TextDefault(text: title,fontSize: ConstVariable().fontSizeInput,textAlign: TextAlign.end),
child: TextDefault(text: title,fontSize: ConstVariable().fontSizeInput,textAlign: TextAlign.end,color: Colors.black,),
),
value: select,
items: list.map((value) => DropdownMenuItem(

View File

@@ -10,7 +10,7 @@ class InputText extends StatelessWidget {
String hint;
double width;
String label;
bool enable;
bool enabled;
TextInputType textInputType;
int maxLines;
Color colorBorder;
@@ -23,7 +23,7 @@ class InputText extends StatelessWidget {
this.fontSize = 15.0,
this.hint = '',
this.label = '',
this.enable = true,
this.enabled = true,
this.textInputType = TextInputType.text,
this.maxLines = 1,
this.colorBorder = ColorPalette.black54,
@@ -33,7 +33,7 @@ class InputText extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: ColorPalette.white,
color: enabled?ColorPalette.white:ColorPalette.disable,
margin: EdgeInsets.only(top: 5),
width: width,
child: TextFormField(
@@ -68,9 +68,9 @@ class InputText extends StatelessWidget {
borderRadius: BorderRadius.circular(3),
),
hintText: this.hint,
enabled: enable,
enabled: enabled,
hintStyle: TextStyle(
color: ColorPalette.gray,
color: Colors.black,
fontSize: this.fontSize,
)
)

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,)
],
);