From 9367641ce2ac1f2a5384b355dd712ba9bead9b0b Mon Sep 17 00:00:00 2001 From: Renzo Olivares Date: Fri, 17 Feb 2023 10:42:09 -0800 Subject: [PATCH] clean up (#120934) Co-authored-by: Renzo Olivares --- .../lib/input_decorator_template.dart | 42 +++++++++---------- .../lib/src/material/input_decorator.dart | 34 +++++++-------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/dev/tools/gen_defaults/lib/input_decorator_template.dart b/dev/tools/gen_defaults/lib/input_decorator_template.dart index 50ba7b42425..8e1b213f5f2 100644 --- a/dev/tools/gen_defaults/lib/input_decorator_template.dart +++ b/dev/tools/gen_defaults/lib/input_decorator_template.dart @@ -137,23 +137,23 @@ class _${blockName}DefaultsM3 extends InputDecorationTheme { final TextStyle textStyle = ${textStyle("md.comp.filled-text-field.label-text")} ?? const TextStyle(); if(states.contains(MaterialState.error)) { if (states.contains(MaterialState.focused)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.focus.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.focus.label-text')}); } if (states.contains(MaterialState.hovered)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.hover.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.hover.label-text')}); } - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.label-text')}); } if (states.contains(MaterialState.focused)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.focus.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.focus.label-text')}); } if (states.contains(MaterialState.hovered)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.hover.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.hover.label-text')}); } if (states.contains(MaterialState.disabled)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.disabled.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.disabled.label-text')}); } - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.label-text')}); }); @override @@ -161,50 +161,50 @@ class _${blockName}DefaultsM3 extends InputDecorationTheme { final TextStyle textStyle = ${textStyle("md.comp.filled-text-field.label-text")} ?? const TextStyle(); if(states.contains(MaterialState.error)) { if (states.contains(MaterialState.focused)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.focus.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.focus.label-text')}); } if (states.contains(MaterialState.hovered)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.hover.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.hover.label-text')}); } - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.label-text')}); } if (states.contains(MaterialState.focused)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.focus.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.focus.label-text')}); } if (states.contains(MaterialState.hovered)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.hover.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.hover.label-text')}); } if (states.contains(MaterialState.disabled)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.disabled.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.disabled.label-text')}); } - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.label-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.label-text')}); }); @override TextStyle? get helperStyle => MaterialStateTextStyle.resolveWith((Set states) { final TextStyle textStyle = ${textStyle("md.comp.filled-text-field.supporting-text")} ?? const TextStyle();${componentColor('md.comp.filled-text-field.focus.supporting-text') == componentColor('md.comp.filled-text-field.supporting-text') ? '' : ''' if (states.contains(MaterialState.focused)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.focus.supporting-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.focus.supporting-text')}); }'''}${componentColor('md.comp.filled-text-field.hover.supporting-text') == componentColor('md.comp.filled-text-field.supporting-text') ? '' : ''' if (states.contains(MaterialState.hovered)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.hover.supporting-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.hover.supporting-text')}); }'''} if (states.contains(MaterialState.disabled)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.disabled.supporting-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.disabled.supporting-text')}); } - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.supporting-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.supporting-text')}); }); @override TextStyle? get errorStyle => MaterialStateTextStyle.resolveWith((Set states) { final TextStyle textStyle = ${textStyle("md.comp.filled-text-field.supporting-text")} ?? const TextStyle();${componentColor('md.comp.filled-text-field.error.focus.supporting-text') == componentColor('md.comp.filled-text-field.error.supporting-text') ? '' : ''' if (states.contains(MaterialState.focused)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.focus.supporting-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.focus.supporting-text')}); }'''}${componentColor('md.comp.filled-text-field.error.hover.supporting-text') == componentColor('md.comp.filled-text-field.error.supporting-text') ? '' : ''' if (states.contains(MaterialState.hovered)) { - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.hover.supporting-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.hover.supporting-text')}); }'''} - return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.supporting-text')}); + return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.supporting-text')}); }); } '''; diff --git a/packages/flutter/lib/src/material/input_decorator.dart b/packages/flutter/lib/src/material/input_decorator.dart index 0ac7894aa54..411edf0c0c0 100644 --- a/packages/flutter/lib/src/material/input_decorator.dart +++ b/packages/flutter/lib/src/material/input_decorator.dart @@ -4645,23 +4645,23 @@ class _InputDecoratorDefaultsM3 extends InputDecorationTheme { final TextStyle textStyle = _textTheme.bodyLarge ?? const TextStyle(); if(states.contains(MaterialState.error)) { if (states.contains(MaterialState.focused)) { - return textStyle.copyWith(color:_colors.error); + return textStyle.copyWith(color: _colors.error); } if (states.contains(MaterialState.hovered)) { - return textStyle.copyWith(color:_colors.onErrorContainer); + return textStyle.copyWith(color: _colors.onErrorContainer); } - return textStyle.copyWith(color:_colors.error); + return textStyle.copyWith(color: _colors.error); } if (states.contains(MaterialState.focused)) { - return textStyle.copyWith(color:_colors.primary); + return textStyle.copyWith(color: _colors.primary); } if (states.contains(MaterialState.hovered)) { - return textStyle.copyWith(color:_colors.onSurfaceVariant); + return textStyle.copyWith(color: _colors.onSurfaceVariant); } if (states.contains(MaterialState.disabled)) { - return textStyle.copyWith(color:_colors.onSurface.withOpacity(0.38)); + return textStyle.copyWith(color: _colors.onSurface.withOpacity(0.38)); } - return textStyle.copyWith(color:_colors.onSurfaceVariant); + return textStyle.copyWith(color: _colors.onSurfaceVariant); }); @override @@ -4669,38 +4669,38 @@ class _InputDecoratorDefaultsM3 extends InputDecorationTheme { final TextStyle textStyle = _textTheme.bodyLarge ?? const TextStyle(); if(states.contains(MaterialState.error)) { if (states.contains(MaterialState.focused)) { - return textStyle.copyWith(color:_colors.error); + return textStyle.copyWith(color: _colors.error); } if (states.contains(MaterialState.hovered)) { - return textStyle.copyWith(color:_colors.onErrorContainer); + return textStyle.copyWith(color: _colors.onErrorContainer); } - return textStyle.copyWith(color:_colors.error); + return textStyle.copyWith(color: _colors.error); } if (states.contains(MaterialState.focused)) { - return textStyle.copyWith(color:_colors.primary); + return textStyle.copyWith(color: _colors.primary); } if (states.contains(MaterialState.hovered)) { - return textStyle.copyWith(color:_colors.onSurfaceVariant); + return textStyle.copyWith(color: _colors.onSurfaceVariant); } if (states.contains(MaterialState.disabled)) { - return textStyle.copyWith(color:_colors.onSurface.withOpacity(0.38)); + return textStyle.copyWith(color: _colors.onSurface.withOpacity(0.38)); } - return textStyle.copyWith(color:_colors.onSurfaceVariant); + return textStyle.copyWith(color: _colors.onSurfaceVariant); }); @override TextStyle? get helperStyle => MaterialStateTextStyle.resolveWith((Set states) { final TextStyle textStyle = _textTheme.bodySmall ?? const TextStyle(); if (states.contains(MaterialState.disabled)) { - return textStyle.copyWith(color:_colors.onSurface.withOpacity(0.38)); + return textStyle.copyWith(color: _colors.onSurface.withOpacity(0.38)); } - return textStyle.copyWith(color:_colors.onSurfaceVariant); + return textStyle.copyWith(color: _colors.onSurfaceVariant); }); @override TextStyle? get errorStyle => MaterialStateTextStyle.resolveWith((Set states) { final TextStyle textStyle = _textTheme.bodySmall ?? const TextStyle(); - return textStyle.copyWith(color:_colors.error); + return textStyle.copyWith(color: _colors.error); }); }