@@ -7,10 +7,8 @@ import 'package:flutter/material.dart';
77/// A function that returns the path of a golden test file for a given test's
88/// [fileName] . This function's return value should include the `.png`
99/// extension.
10- typedef FilePathResolver = FutureOr <String > Function (
11- String fileName,
12- String environmentName,
13- );
10+ typedef FilePathResolver =
11+ FutureOr <String > Function (String fileName, String environmentName);
1412
1513/// {@template alchemist_config}
1614/// A configuration object that contains settings used by Alchemist for
@@ -71,11 +69,11 @@ class AlchemistConfig extends Equatable {
7169 ThemeData ? theme,
7270 PlatformGoldensConfig ? platformGoldensConfig,
7371 CiGoldensConfig ? ciGoldensConfig,
74- }) : _forceUpdateGoldenFiles = forceUpdateGoldenFiles,
75- _theme = theme,
76- _goldenTestTheme = goldenTestTheme,
77- _platformGoldensConfig = platformGoldensConfig,
78- _ciGoldensConfig = ciGoldensConfig;
72+ }) : _forceUpdateGoldenFiles = forceUpdateGoldenFiles,
73+ _theme = theme,
74+ _goldenTestTheme = goldenTestTheme,
75+ _platformGoldensConfig = platformGoldensConfig,
76+ _ciGoldensConfig = ciGoldensConfig;
7977
8078 /// The instance of the [AlchemistConfig] in the current zone used by the
8179 /// `alchemist` package.
@@ -161,12 +159,7 @@ class AlchemistConfig extends Equatable {
161159 required AlchemistConfig config,
162160 required T Function () run,
163161 }) {
164- return runZoned <T >(
165- run,
166- zoneValues: {
167- currentConfigKey: config,
168- },
169- );
162+ return runZoned <T >(run, zoneValues: {currentConfigKey: config});
170163 }
171164
172165 /// Whether to force the golden tests to update the golden file.
@@ -236,20 +229,21 @@ class AlchemistConfig extends Equatable {
236229 forceUpdateGoldenFiles: other? ._forceUpdateGoldenFiles,
237230 theme: other? ._theme,
238231 goldenTestTheme: other? ._goldenTestTheme,
239- platformGoldensConfig:
240- platformGoldensConfig.merge (other? ._platformGoldensConfig),
232+ platformGoldensConfig: platformGoldensConfig.merge (
233+ other? ._platformGoldensConfig,
234+ ),
241235 ciGoldensConfig: ciGoldensConfig.merge (other? ._ciGoldensConfig),
242236 );
243237 }
244238
245239 @override
246240 List <Object ?> get props => [
247- forceUpdateGoldenFiles,
248- theme,
249- goldenTestTheme,
250- platformGoldensConfig,
251- ciGoldensConfig,
252- ];
241+ forceUpdateGoldenFiles,
242+ theme,
243+ goldenTestTheme,
244+ platformGoldensConfig,
245+ ciGoldensConfig,
246+ ];
253247}
254248
255249/// {@template goldens_config}
@@ -295,8 +289,8 @@ abstract class GoldensConfig extends Equatable {
295289 required this .renderShadows,
296290 FilePathResolver ? filePathResolver,
297291 ThemeData ? theme,
298- }) : _filePathResolver = filePathResolver,
299- _theme = theme;
292+ }) : _filePathResolver = filePathResolver,
293+ _theme = theme;
300294
301295 /// Whether or not the golden tests should run.
302296 final bool enabled;
@@ -366,12 +360,12 @@ abstract class GoldensConfig extends Equatable {
366360
367361 @override
368362 List <Object ?> get props => [
369- obscureText,
370- enabled,
371- filePathResolver,
372- theme,
373- renderShadows,
374- ];
363+ obscureText,
364+ enabled,
365+ filePathResolver,
366+ theme,
367+ renderShadows,
368+ ];
375369}
376370
377371/// {@template platform_goldens_config}
@@ -457,10 +451,7 @@ class PlatformGoldensConfig extends GoldensConfig {
457451 }
458452
459453 @override
460- List <Object ?> get props => [
461- ...super .props,
462- platforms,
463- ];
454+ List <Object ?> get props => [...super .props, platforms];
464455}
465456
466457/// {@template ci_goldens_config}
0 commit comments