mainInputTheme top-level property
Implementation
ThemeData mainInputTheme = blueTheme().copyWith(
inputDecorationTheme: InputDecorationTheme(
alignLabelWithHint: true,
errorMaxLines: 3,
contentPadding: const EdgeInsets.only(bottom: 2),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: blueTheme().primaryColor,
),
),
labelStyle: WidgetStateTextStyle.resolveWith((Set<WidgetState> states) {
if (states.contains(WidgetState.error)) {
return blueTheme()
.inputDecorationTheme
.labelStyle!
.copyWith(height: 5.5);
}
return blueTheme().inputDecorationTheme.labelStyle!;
}),
disabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: blueTheme().colorScheme.onSurface.withValues(alpha: 0.6),
),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: blueTheme().colorScheme.onSurface.withValues(alpha: 0.6),
),
),
),
);