build method
Implementation
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final cursor =
color ?? theme.textSelectionTheme.cursorColor ?? Colors.black;
final _decoration = (decoration ??
InputDecoration(
border:
UnderlineInputBorder(borderSide: BorderSide(color: cursor)),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: cursor.withOpacity(0.5))),
focusedBorder:
UnderlineInputBorder(borderSide: BorderSide(color: cursor)),
disabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: cursor.withOpacity(0.25))),
labelStyle: theme.textTheme.bodyLarge!
.copyWith(color: cursor.withOpacity(0.5)),
hintStyle: theme.textTheme.bodyLarge!
.copyWith(color: cursor.withOpacity(0.5)),
))
.copyWith(
labelText: label,
hintText: hint,
errorText: (!control.isValid) ? control.error : null,
);
return builder.call(
context,
control,
_decoration,
);
}