80 lines
2.5 KiB
Dart
80 lines
2.5 KiB
Dart
|
import 'package:flutter/material.dart';
|
||
|
import 'package:recomendagro/assets/theme/colors.dart';
|
||
|
import '../../../utils/enums.dart';
|
||
|
|
||
|
|
||
|
InputDecoration inputThemeDecoration(
|
||
|
BuildContext context,
|
||
|
{
|
||
|
StatusTextField? statusTextField,
|
||
|
String? hintText,
|
||
|
String? title,
|
||
|
Widget? suffixIcon,
|
||
|
Widget? prefix
|
||
|
}){
|
||
|
return InputDecoration(
|
||
|
isDense: true,
|
||
|
contentPadding: const EdgeInsets.fromLTRB(10, 7, 10, 10),
|
||
|
hintText: hintText,
|
||
|
suffixIcon: suffixIcon,
|
||
|
labelText: title,
|
||
|
prefixIcon: prefix,
|
||
|
border: InputBorder.none,
|
||
|
errorStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||
|
fontSize: 0,
|
||
|
height: 1.3,
|
||
|
color: AppColorLight.text03Color
|
||
|
),
|
||
|
floatingLabelStyle: TextStyle(
|
||
|
color: statusTextField == StatusTextField.desabilitado ? AppColorLight.text04Color :
|
||
|
statusTextField != StatusTextField.valided ? AppColorLight.erroColor : AppColorLight.primaryColor
|
||
|
),
|
||
|
labelStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||
|
fontSize: 14,
|
||
|
height: 0.0,
|
||
|
fontWeight: FontWeight.w600,
|
||
|
color: AppColorLight.text02Color
|
||
|
),
|
||
|
hintStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||
|
fontSize: 14,
|
||
|
height: 0.0,
|
||
|
fontWeight: FontWeight.w600,
|
||
|
color: AppColorLight.text02Color
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
|
||
|
// InputDecoration inputThemeDecorationMobile(
|
||
|
// BuildContext context,
|
||
|
// {
|
||
|
// String? hintText,
|
||
|
// String? title,
|
||
|
// Widget? suffixIcon,
|
||
|
// Widget? prefix,
|
||
|
// required StatusTextField statusTextField
|
||
|
// }){
|
||
|
// return InputDecoration(
|
||
|
// isDense: true,
|
||
|
// contentPadding: const EdgeInsets.fromLTRB(10, 12, 10, 15),
|
||
|
// hintText: hintText,
|
||
|
// suffixIcon: suffixIcon,
|
||
|
// labelText: title,
|
||
|
// prefixIcon: prefix,
|
||
|
// border: InputBorder.none,
|
||
|
// errorStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||
|
// fontSize: 0,
|
||
|
// height: 1.3,
|
||
|
// color: AppColorLight.erroColor
|
||
|
// ),
|
||
|
// // floatingLabelStyle: TextStyle(
|
||
|
// // color: statusTextField == StatusTextField.desabilitado ? AppColorLight.text04Color :
|
||
|
// // statusTextField != StatusTextField.valided ? AppColorLight.erroColor : AppColorLight.primaryColor
|
||
|
// // ),
|
||
|
// hintStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||
|
// fontSize: 14,
|
||
|
// height: 1.0,
|
||
|
// fontWeight: FontWeight.w600,
|
||
|
// color: AppColorLight.text02Color
|
||
|
// )
|
||
|
// );
|
||
|
// }
|