maybeApplyInputDecoration method
BoxDecoration
maybeApplyInputDecoration(
- BuildContext context,
- BoxDecoration decoration,
- bool focused
Implementation
BoxDecoration maybeApplyInputDecoration(BuildContext context, BoxDecoration decoration, bool focused) {
var inputDecorationTheme = Theme.of(context).inputDecorationTheme;
var inputBorder = focused ? inputDecorationTheme.focusedBorder : inputDecorationTheme.enabledBorder;
if (inputBorder is OutlineInputBorder) {
return decoration.copyWith(
border: Border.fromBorderSide(inputBorder.borderSide),
borderRadius: inputBorder.borderRadius
);
}
return decoration;
}