Skip to content

Commit 9367641

Browse files
Renzo-OlivaresRenzo Olivares
and
Renzo Olivares
authored
clean up (#120934)
Co-authored-by: Renzo Olivares <[email protected]>
1 parent c4d40cc commit 9367641

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed

dev/tools/gen_defaults/lib/input_decorator_template.dart

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -137,74 +137,74 @@ class _${blockName}DefaultsM3 extends InputDecorationTheme {
137137
final TextStyle textStyle = ${textStyle("md.comp.filled-text-field.label-text")} ?? const TextStyle();
138138
if(states.contains(MaterialState.error)) {
139139
if (states.contains(MaterialState.focused)) {
140-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.focus.label-text')});
140+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.focus.label-text')});
141141
}
142142
if (states.contains(MaterialState.hovered)) {
143-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.hover.label-text')});
143+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.hover.label-text')});
144144
}
145-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.label-text')});
145+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.label-text')});
146146
}
147147
if (states.contains(MaterialState.focused)) {
148-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.focus.label-text')});
148+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.focus.label-text')});
149149
}
150150
if (states.contains(MaterialState.hovered)) {
151-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.hover.label-text')});
151+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.hover.label-text')});
152152
}
153153
if (states.contains(MaterialState.disabled)) {
154-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.disabled.label-text')});
154+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.disabled.label-text')});
155155
}
156-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.label-text')});
156+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.label-text')});
157157
});
158158
159159
@override
160160
TextStyle? get floatingLabelStyle => MaterialStateTextStyle.resolveWith((Set<MaterialState> states) {
161161
final TextStyle textStyle = ${textStyle("md.comp.filled-text-field.label-text")} ?? const TextStyle();
162162
if(states.contains(MaterialState.error)) {
163163
if (states.contains(MaterialState.focused)) {
164-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.focus.label-text')});
164+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.focus.label-text')});
165165
}
166166
if (states.contains(MaterialState.hovered)) {
167-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.hover.label-text')});
167+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.hover.label-text')});
168168
}
169-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.label-text')});
169+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.label-text')});
170170
}
171171
if (states.contains(MaterialState.focused)) {
172-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.focus.label-text')});
172+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.focus.label-text')});
173173
}
174174
if (states.contains(MaterialState.hovered)) {
175-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.hover.label-text')});
175+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.hover.label-text')});
176176
}
177177
if (states.contains(MaterialState.disabled)) {
178-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.disabled.label-text')});
178+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.disabled.label-text')});
179179
}
180-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.label-text')});
180+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.label-text')});
181181
});
182182
183183
@override
184184
TextStyle? get helperStyle => MaterialStateTextStyle.resolveWith((Set<MaterialState> states) {
185185
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') ? '' : '''
186186
if (states.contains(MaterialState.focused)) {
187-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.focus.supporting-text')});
187+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.focus.supporting-text')});
188188
}'''}${componentColor('md.comp.filled-text-field.hover.supporting-text') == componentColor('md.comp.filled-text-field.supporting-text') ? '' : '''
189189
if (states.contains(MaterialState.hovered)) {
190-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.hover.supporting-text')});
190+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.hover.supporting-text')});
191191
}'''}
192192
if (states.contains(MaterialState.disabled)) {
193-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.disabled.supporting-text')});
193+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.disabled.supporting-text')});
194194
}
195-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.supporting-text')});
195+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.supporting-text')});
196196
});
197197
198198
@override
199199
TextStyle? get errorStyle => MaterialStateTextStyle.resolveWith((Set<MaterialState> states) {
200200
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') ? '' : '''
201201
if (states.contains(MaterialState.focused)) {
202-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.focus.supporting-text')});
202+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.focus.supporting-text')});
203203
}'''}${componentColor('md.comp.filled-text-field.error.hover.supporting-text') == componentColor('md.comp.filled-text-field.error.supporting-text') ? '' : '''
204204
if (states.contains(MaterialState.hovered)) {
205-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.hover.supporting-text')});
205+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.hover.supporting-text')});
206206
}'''}
207-
return textStyle.copyWith(color:${componentColor('md.comp.filled-text-field.error.supporting-text')});
207+
return textStyle.copyWith(color: ${componentColor('md.comp.filled-text-field.error.supporting-text')});
208208
});
209209
}
210210
''';

packages/flutter/lib/src/material/input_decorator.dart

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4645,62 +4645,62 @@ class _InputDecoratorDefaultsM3 extends InputDecorationTheme {
46454645
final TextStyle textStyle = _textTheme.bodyLarge ?? const TextStyle();
46464646
if(states.contains(MaterialState.error)) {
46474647
if (states.contains(MaterialState.focused)) {
4648-
return textStyle.copyWith(color:_colors.error);
4648+
return textStyle.copyWith(color: _colors.error);
46494649
}
46504650
if (states.contains(MaterialState.hovered)) {
4651-
return textStyle.copyWith(color:_colors.onErrorContainer);
4651+
return textStyle.copyWith(color: _colors.onErrorContainer);
46524652
}
4653-
return textStyle.copyWith(color:_colors.error);
4653+
return textStyle.copyWith(color: _colors.error);
46544654
}
46554655
if (states.contains(MaterialState.focused)) {
4656-
return textStyle.copyWith(color:_colors.primary);
4656+
return textStyle.copyWith(color: _colors.primary);
46574657
}
46584658
if (states.contains(MaterialState.hovered)) {
4659-
return textStyle.copyWith(color:_colors.onSurfaceVariant);
4659+
return textStyle.copyWith(color: _colors.onSurfaceVariant);
46604660
}
46614661
if (states.contains(MaterialState.disabled)) {
4662-
return textStyle.copyWith(color:_colors.onSurface.withOpacity(0.38));
4662+
return textStyle.copyWith(color: _colors.onSurface.withOpacity(0.38));
46634663
}
4664-
return textStyle.copyWith(color:_colors.onSurfaceVariant);
4664+
return textStyle.copyWith(color: _colors.onSurfaceVariant);
46654665
});
46664666

46674667
@override
46684668
TextStyle? get floatingLabelStyle => MaterialStateTextStyle.resolveWith((Set<MaterialState> states) {
46694669
final TextStyle textStyle = _textTheme.bodyLarge ?? const TextStyle();
46704670
if(states.contains(MaterialState.error)) {
46714671
if (states.contains(MaterialState.focused)) {
4672-
return textStyle.copyWith(color:_colors.error);
4672+
return textStyle.copyWith(color: _colors.error);
46734673
}
46744674
if (states.contains(MaterialState.hovered)) {
4675-
return textStyle.copyWith(color:_colors.onErrorContainer);
4675+
return textStyle.copyWith(color: _colors.onErrorContainer);
46764676
}
4677-
return textStyle.copyWith(color:_colors.error);
4677+
return textStyle.copyWith(color: _colors.error);
46784678
}
46794679
if (states.contains(MaterialState.focused)) {
4680-
return textStyle.copyWith(color:_colors.primary);
4680+
return textStyle.copyWith(color: _colors.primary);
46814681
}
46824682
if (states.contains(MaterialState.hovered)) {
4683-
return textStyle.copyWith(color:_colors.onSurfaceVariant);
4683+
return textStyle.copyWith(color: _colors.onSurfaceVariant);
46844684
}
46854685
if (states.contains(MaterialState.disabled)) {
4686-
return textStyle.copyWith(color:_colors.onSurface.withOpacity(0.38));
4686+
return textStyle.copyWith(color: _colors.onSurface.withOpacity(0.38));
46874687
}
4688-
return textStyle.copyWith(color:_colors.onSurfaceVariant);
4688+
return textStyle.copyWith(color: _colors.onSurfaceVariant);
46894689
});
46904690

46914691
@override
46924692
TextStyle? get helperStyle => MaterialStateTextStyle.resolveWith((Set<MaterialState> states) {
46934693
final TextStyle textStyle = _textTheme.bodySmall ?? const TextStyle();
46944694
if (states.contains(MaterialState.disabled)) {
4695-
return textStyle.copyWith(color:_colors.onSurface.withOpacity(0.38));
4695+
return textStyle.copyWith(color: _colors.onSurface.withOpacity(0.38));
46964696
}
4697-
return textStyle.copyWith(color:_colors.onSurfaceVariant);
4697+
return textStyle.copyWith(color: _colors.onSurfaceVariant);
46984698
});
46994699

47004700
@override
47014701
TextStyle? get errorStyle => MaterialStateTextStyle.resolveWith((Set<MaterialState> states) {
47024702
final TextStyle textStyle = _textTheme.bodySmall ?? const TextStyle();
4703-
return textStyle.copyWith(color:_colors.error);
4703+
return textStyle.copyWith(color: _colors.error);
47044704
});
47054705
}
47064706

0 commit comments

Comments
 (0)