Unverified Commit 9367641c authored by Renzo Olivares's avatar Renzo Olivares Committed by GitHub

clean up (#120934)

Co-authored-by: 's avatarRenzo Olivares <roliv@google.com>
parent c4d40cc1
......@@ -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<MaterialState> 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<MaterialState> 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')});
});
}
''';
......
......@@ -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<MaterialState> 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<MaterialState> states) {
final TextStyle textStyle = _textTheme.bodySmall ?? const TextStyle();
return textStyle.copyWith(color:_colors.error);
return textStyle.copyWith(color: _colors.error);
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment