@@ -11,8 +11,12 @@ void main() {
1111 final List <MethodCall > log = < MethodCall > [];
1212
1313 // Helper to create a color map in the format the plugin expects
14- Map <String , dynamic > createColorMap (
15- {int r = 0 , int g = 0 , int b = 0 , int a = 255 }) {
14+ Map <String , dynamic > createColorMap ({
15+ int r = 0 ,
16+ int g = 0 ,
17+ int b = 0 ,
18+ int a = 255 ,
19+ }) {
1620 return {'R' : r, 'G' : g, 'B' : b, 'A' : a};
1721 }
1822
@@ -35,14 +39,12 @@ void main() {
3539
3640 TestDefaultBinaryMessengerBinding .instance.defaultBinaryMessenger
3741 .setMockMethodCallHandler (channel, (MethodCall methodCall) async {
38- log.add (methodCall);
39- if (methodCall.method == 'SystemTheme.accentColor' ) {
40- return {
41- 'accent' : createColorMap (r: 0 , g: 0 , b: 255 ),
42- };
43- }
44- return null ;
45- });
42+ log.add (methodCall);
43+ if (methodCall.method == 'SystemTheme.accentColor' ) {
44+ return {'accent' : createColorMap (r: 0 , g: 0 , b: 255 )};
45+ }
46+ return null ;
47+ });
4648 });
4749
4850 tearDown (() {
@@ -63,11 +65,15 @@ void main() {
6365 test ('Check platform support for listening to changes' , () {
6466 debugDefaultTargetPlatformOverride = TargetPlatform .windows;
6567 expect (
66- defaultTargetPlatform.supportsListeningToAccentColorChanges, isTrue);
68+ defaultTargetPlatform.supportsListeningToAccentColorChanges,
69+ isTrue,
70+ );
6771
6872 debugDefaultTargetPlatformOverride = TargetPlatform .android;
6973 expect (
70- defaultTargetPlatform.supportsListeningToAccentColorChanges, isFalse);
74+ defaultTargetPlatform.supportsListeningToAccentColorChanges,
75+ isFalse,
76+ );
7177 });
7278
7379 test ('Loads accent color correctly (Singleton)' , () async {
@@ -82,8 +88,8 @@ void main() {
8288 test ('Handles MissingPluginException gracefully' , () async {
8389 TestDefaultBinaryMessengerBinding .instance.defaultBinaryMessenger
8490 .setMockMethodCallHandler (channel, (MethodCall methodCall) async {
85- throw MissingPluginException ();
86- });
91+ throw MissingPluginException ();
92+ });
8793
8894 final testTheme = SystemAccentColor (kDefaultFallbackColor);
8995
@@ -97,8 +103,8 @@ void main() {
97103
98104 TestDefaultBinaryMessengerBinding .instance.defaultBinaryMessenger
99105 .setMockMethodCallHandler (channel, (MethodCall methodCall) async {
100- return null ;
101- });
106+ return null ;
107+ });
102108
103109 final testTheme = SystemAccentColor (customFallback);
104110
@@ -114,10 +120,8 @@ void main() {
114120
115121 TestDefaultBinaryMessengerBinding .instance.defaultBinaryMessenger
116122 .setMockMethodCallHandler (channel, (MethodCall methodCall) async {
117- return {
118- 'accent' : createColorMap (r: 0 , g: 0 , b: 255 ),
119- };
120- });
123+ return {'accent' : createColorMap (r: 0 , g: 0 , b: 255 )};
124+ });
121125
122126 final testTheme = SystemAccentColor (kDefaultFallbackColor);
123127 await testTheme.load ();
@@ -134,11 +138,11 @@ void main() {
134138
135139 TestDefaultBinaryMessengerBinding .instance.defaultBinaryMessenger
136140 .setMockMethodCallHandler (channel, (MethodCall methodCall) async {
137- return {
138- 'accent' : createColorMap (r: 0 , g: 0 , b: 255 ),
139- 'light' : createColorMap (r: 0 , g: 255 , b: 0 ),
140- };
141- });
141+ return {
142+ 'accent' : createColorMap (r: 0 , g: 0 , b: 255 ),
143+ 'light' : createColorMap (r: 0 , g: 255 , b: 0 ),
144+ };
145+ });
142146
143147 final testTheme = SystemAccentColor (kDefaultFallbackColor);
144148 await testTheme.load ();
@@ -151,10 +155,8 @@ void main() {
151155
152156 TestDefaultBinaryMessengerBinding .instance.defaultBinaryMessenger
153157 .setMockMethodCallHandler (channel, (MethodCall methodCall) async {
154- return {
155- 'accent' : createColorMap (r: 0 , g: 0 , b: 255 ),
156- };
157- });
158+ return {'accent' : createColorMap (r: 0 , g: 0 , b: 255 )};
159+ });
158160
159161 final testTheme = SystemAccentColor (kDefaultFallbackColor);
160162 await testTheme.load ();
0 commit comments