Skip to content

Commit 252f6a0

Browse files
authored
Add fixes for ThemeData (flutter#86369)
1 parent 81c9192 commit 252f6a0

File tree

3 files changed

+444
-0
lines changed

3 files changed

+444
-0
lines changed

packages/flutter/lib/fix_data.yaml

Lines changed: 356 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,362 @@
1515
version: 1
1616
transforms:
1717

18+
# Changes made in https://github.com/flutter/flutter/pull/81336
19+
- title: "Remove 'buttonColor'"
20+
date: 2021-04-30
21+
element:
22+
uris: [ 'material.dart' ]
23+
method: 'copyWith'
24+
inClass: 'ThemeData'
25+
changes:
26+
- kind: 'removeParameter'
27+
name: 'buttonColor'
28+
29+
# Changes made in https://github.com/flutter/flutter/pull/81336
30+
- title: "Remove 'buttonColor'"
31+
date: 2021-04-30
32+
element:
33+
uris: [ 'material.dart' ]
34+
constructor: 'raw'
35+
inClass: 'ThemeData'
36+
changes:
37+
- kind: 'removeParameter'
38+
name: 'buttonColor'
39+
40+
# Changes made in https://github.com/flutter/flutter/pull/81336
41+
- title: "Remove 'buttonColor'"
42+
date: 2021-04-30
43+
element:
44+
uris: [ 'material.dart' ]
45+
constructor: ''
46+
inClass: 'ThemeData'
47+
changes:
48+
- kind: 'removeParameter'
49+
name: 'buttonColor'
50+
51+
# Changes made in https://github.com/flutter/flutter/pull/81336
52+
- title: "Remove 'accentIconTheme'"
53+
date: 2021-04-30
54+
element:
55+
uris: [ 'material.dart' ]
56+
method: 'copyWith'
57+
inClass: 'ThemeData'
58+
changes:
59+
- kind: 'removeParameter'
60+
name: 'accentIconTheme'
61+
62+
# Changes made in https://github.com/flutter/flutter/pull/81336
63+
- title: "Remove 'accentIconTheme'"
64+
date: 2021-04-30
65+
element:
66+
uris: [ 'material.dart' ]
67+
constructor: 'raw'
68+
inClass: 'ThemeData'
69+
changes:
70+
- kind: 'removeParameter'
71+
name: 'accentIconTheme'
72+
73+
# Changes made in https://github.com/flutter/flutter/pull/81336
74+
- title: "Remove 'accentIconTheme'"
75+
date: 2021-04-30
76+
element:
77+
uris: [ 'material.dart' ]
78+
constructor: ''
79+
inClass: 'ThemeData'
80+
changes:
81+
- kind: 'removeParameter'
82+
name: 'accentIconTheme'
83+
84+
# Changes made in https://github.com/flutter/flutter/pull/81336
85+
- title: "Remove 'accentTextTheme'"
86+
date: 2021-04-30
87+
element:
88+
uris: [ 'material.dart' ]
89+
method: 'copyWith'
90+
inClass: 'ThemeData'
91+
changes:
92+
- kind: 'removeParameter'
93+
name: 'accentTextTheme'
94+
95+
# Changes made in https://github.com/flutter/flutter/pull/81336
96+
- title: "Remove 'accentTextTheme'"
97+
date: 2021-04-30
98+
element:
99+
uris: [ 'material.dart' ]
100+
constructor: 'raw'
101+
inClass: 'ThemeData'
102+
changes:
103+
- kind: 'removeParameter'
104+
name: 'accentTextTheme'
105+
106+
# Changes made in https://github.com/flutter/flutter/pull/81336
107+
- title: "Remove 'accentTextTheme'"
108+
date: 2021-04-30
109+
element:
110+
uris: [ 'material.dart' ]
111+
constructor: ''
112+
inClass: 'ThemeData'
113+
changes:
114+
- kind: 'removeParameter'
115+
name: 'accentTextTheme'
116+
117+
# Changes made in https://github.com/flutter/flutter/pull/81336
118+
- title: "Remove 'accentColorBrightness'"
119+
date: 2021-04-30
120+
element:
121+
uris: [ 'material.dart' ]
122+
method: 'copyWith'
123+
inClass: 'ThemeData'
124+
changes:
125+
- kind: 'removeParameter'
126+
name: 'accentColorBrightness'
127+
128+
# Changes made in https://github.com/flutter/flutter/pull/81336
129+
- title: "Remove 'accentColorBrightness'"
130+
date: 2021-04-30
131+
element:
132+
uris: [ 'material.dart' ]
133+
constructor: 'raw'
134+
inClass: 'ThemeData'
135+
changes:
136+
- kind: 'removeParameter'
137+
name: 'accentColorBrightness'
138+
139+
# Changes made in https://github.com/flutter/flutter/pull/81336
140+
- title: "Remove 'accentColorBrightness'"
141+
date: 2021-04-30
142+
element:
143+
uris: [ 'material.dart' ]
144+
constructor: ''
145+
inClass: 'ThemeData'
146+
changes:
147+
- kind: 'removeParameter'
148+
name: 'accentColorBrightness'
149+
150+
# Changes made in https://github.com/flutter/flutter/pull/81336
151+
- title: "Migrate to 'ColorScheme.secondary'"
152+
date: 2021-04-30
153+
element:
154+
uris: [ 'material.dart' ]
155+
field: 'accentColor'
156+
inClass: 'ThemeData'
157+
changes:
158+
- kind: 'rename'
159+
newName: 'colorScheme.secondary'
160+
161+
# Changes made in https://github.com/flutter/flutter/pull/81336
162+
- title: "Migrate to 'ColorScheme.secondary'"
163+
date: 2021-04-30
164+
element:
165+
uris: [ 'material.dart' ]
166+
method: 'copyWith'
167+
inClass: 'ThemeData'
168+
oneOf:
169+
- if: "accentColor != '' && primarySwatch == '' && colorScheme == ''"
170+
changes:
171+
- kind: 'addParameter'
172+
index: 56
173+
name: 'colorScheme'
174+
style: optional_named
175+
argumentValue:
176+
expression: 'ColorScheme.fromSwatch().copyWith(secondary: {% accentColor %})'
177+
requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme ==''"
178+
- kind: 'removeParameter'
179+
name: 'accentColor'
180+
- if: "accentColor != '' && primarySwatch != '' && colorScheme == ''"
181+
changes:
182+
- kind: 'addParameter'
183+
index: 56
184+
name: 'colorScheme'
185+
style: optional_named
186+
argumentValue:
187+
expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(secondary: {% accentColor %})'
188+
requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme == ''"
189+
- kind: 'removeParameter'
190+
name: 'accentColor'
191+
- kind: 'removeParameter'
192+
name: 'primarySwatch'
193+
- if: "accentColor != '' && primarySwatch == '' && colorScheme != ''"
194+
changes:
195+
- kind: 'removeParameter'
196+
name: 'colorScheme' # Remove to add back with modification
197+
- kind: 'addParameter'
198+
index: 56
199+
name: 'colorScheme'
200+
style: optional_named
201+
argumentValue:
202+
expression: '{% colorScheme %}.copyWith(secondary: {% accentColor %})'
203+
requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme != ''"
204+
- kind: 'removeParameter'
205+
name: 'accentColor'
206+
- if: "accentColor != '' && primarySwatch != '' && colorScheme != ''"
207+
changes:
208+
- kind: 'removeParameter'
209+
name: 'colorScheme' # Remove to add back with modification
210+
- kind: 'addParameter'
211+
index: 56
212+
name: 'colorScheme'
213+
style: optional_named
214+
argumentValue:
215+
expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, secondary: {% accentColor %})'
216+
requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme != ''"
217+
- kind: 'removeParameter'
218+
name: 'accentColor'
219+
- kind: 'removeParameter'
220+
name: 'primarySwatch'
221+
variables:
222+
accentColor:
223+
kind: 'fragment'
224+
value: 'arguments[accentColor]'
225+
primarySwatch:
226+
kind: 'fragment'
227+
value: 'arguments[primarySwatch]'
228+
colorScheme:
229+
kind: 'fragment'
230+
value: 'arguments[colorScheme]'
231+
232+
# Changes made in https://github.com/flutter/flutter/pull/81336
233+
- title: "Migrate to 'ColorScheme.secondary'"
234+
date: 2021-04-30
235+
element:
236+
uris: [ 'material.dart' ]
237+
constructor: 'raw'
238+
inClass: 'ThemeData'
239+
oneOf:
240+
- if: "accentColor != '' && primarySwatch == '' && colorScheme == ''"
241+
changes:
242+
- kind: 'addParameter'
243+
index: 56
244+
name: 'colorScheme'
245+
style: optional_named
246+
argumentValue:
247+
expression: 'ColorScheme.fromSwatch().copyWith(secondary: {% accentColor %})'
248+
requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme ==''"
249+
- kind: 'removeParameter'
250+
name: 'accentColor'
251+
- if: "accentColor != '' && primarySwatch != '' && colorScheme == ''"
252+
changes:
253+
- kind: 'addParameter'
254+
index: 56
255+
name: 'colorScheme'
256+
style: optional_named
257+
argumentValue:
258+
expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(secondary: {% accentColor %})'
259+
requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme == ''"
260+
- kind: 'removeParameter'
261+
name: 'accentColor'
262+
- kind: 'removeParameter'
263+
name: 'primarySwatch'
264+
- if: "accentColor != '' && primarySwatch == '' && colorScheme != ''"
265+
changes:
266+
- kind: 'removeParameter'
267+
name: 'colorScheme' # Remove to add back with modification
268+
- kind: 'addParameter'
269+
index: 56
270+
name: 'colorScheme'
271+
style: optional_named
272+
argumentValue:
273+
expression: '{% colorScheme %}.copyWith(secondary: {% accentColor %})'
274+
requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme != ''"
275+
- kind: 'removeParameter'
276+
name: 'accentColor'
277+
- if: "accentColor != '' && primarySwatch != '' && colorScheme != ''"
278+
changes:
279+
- kind: 'removeParameter'
280+
name: 'colorScheme' # Remove to add back with modification
281+
- kind: 'addParameter'
282+
index: 56
283+
name: 'colorScheme'
284+
style: optional_named
285+
argumentValue:
286+
expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, secondary: {% accentColor %})'
287+
requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme != ''"
288+
- kind: 'removeParameter'
289+
name: 'accentColor'
290+
- kind: 'removeParameter'
291+
name: 'primarySwatch'
292+
variables:
293+
accentColor:
294+
kind: 'fragment'
295+
value: 'arguments[accentColor]'
296+
primarySwatch:
297+
kind: 'fragment'
298+
value: 'arguments[primarySwatch]'
299+
colorScheme:
300+
kind: 'fragment'
301+
value: 'arguments[colorScheme]'
302+
303+
# Changes made in https://github.com/flutter/flutter/pull/81336
304+
- title: "Migrate to 'ColorScheme.secondary'"
305+
date: 2021-04-30
306+
element:
307+
uris: [ 'material.dart' ]
308+
constructor: ''
309+
inClass: 'ThemeData'
310+
oneOf:
311+
- if: "accentColor != '' && primarySwatch == '' && colorScheme == ''"
312+
changes:
313+
- kind: 'addParameter'
314+
index: 56
315+
name: 'colorScheme'
316+
style: optional_named
317+
argumentValue:
318+
expression: 'ColorScheme.fromSwatch().copyWith(secondary: {% accentColor %})'
319+
requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme ==''"
320+
- kind: 'removeParameter'
321+
name: 'accentColor'
322+
- if: "accentColor != '' && primarySwatch != '' && colorScheme == ''"
323+
changes:
324+
- kind: 'addParameter'
325+
index: 56
326+
name: 'colorScheme'
327+
style: optional_named
328+
argumentValue:
329+
expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(secondary: {% accentColor %})'
330+
requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme == ''"
331+
- kind: 'removeParameter'
332+
name: 'accentColor'
333+
- kind: 'removeParameter'
334+
name: 'primarySwatch'
335+
- if: "accentColor != '' && primarySwatch == '' && colorScheme != ''"
336+
changes:
337+
- kind: 'removeParameter'
338+
name: 'colorScheme' # Remove to add back with modification
339+
- kind: 'addParameter'
340+
index: 56
341+
name: 'colorScheme'
342+
style: optional_named
343+
argumentValue:
344+
expression: '{% colorScheme %}.copyWith(secondary: {% accentColor %})'
345+
requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme != ''"
346+
- kind: 'removeParameter'
347+
name: 'accentColor'
348+
- if: "accentColor != '' && primarySwatch != '' && colorScheme != ''"
349+
changes:
350+
- kind: 'removeParameter'
351+
name: 'colorScheme' # Remove to add back with modification
352+
- kind: 'addParameter'
353+
index: 56
354+
name: 'colorScheme'
355+
style: optional_named
356+
argumentValue:
357+
expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, secondary: {% accentColor %})'
358+
requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme != ''"
359+
- kind: 'removeParameter'
360+
name: 'accentColor'
361+
- kind: 'removeParameter'
362+
name: 'primarySwatch'
363+
variables:
364+
accentColor:
365+
kind: 'fragment'
366+
value: 'arguments[accentColor]'
367+
primarySwatch:
368+
kind: 'fragment'
369+
value: 'arguments[primarySwatch]'
370+
colorScheme:
371+
kind: 'fragment'
372+
value: 'arguments[colorScheme]'
373+
18374
# Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior
19375
- title: "Migrate to 'clipBehavior'"
20376
date: 2020-08-20

0 commit comments

Comments
 (0)