@@ -18,9 +18,8 @@ abstract class ProcessSignalOverrides {
1818 /// See also:
1919 /// * [ProcessSignalOverrides.runZoned] to provide [ProcessSignalOverrides]
2020 /// in a fresh [Zone] .
21- static ProcessSignalOverrides ? get current {
22- return Zone .current[_token] as ProcessSignalOverrides ? ;
23- }
21+ static ProcessSignalOverrides ? get current =>
22+ Zone .current[_token] as ProcessSignalOverrides ? ;
2423
2524 /// Runs [body] in a fresh [Zone] using the provided overrides.
2625 static R runZoned <R >(
@@ -50,9 +49,7 @@ class _ProcessSignalOverridesScope extends ProcessSignalOverrides {
5049 }
5150
5251 @override
53- Stream <ProcessSignal >? get sigintWatch {
54- return _sigintStreamController? .stream;
55- }
52+ Stream <ProcessSignal >? get sigintWatch => _sigintStreamController? .stream;
5653}
5754
5855/// Thrown when `flutter pub get` is executed without a `pubspec.yaml` .
@@ -165,25 +162,23 @@ class Flutter {
165162 void Function (String )? stdout,
166163 void Function (String )? stderr,
167164 GeneratorBuilder buildGenerator = MasonGenerator .fromBundle,
168- }) async {
169- return TestCLIRunner .test (
170- logger: logger,
171- testType: TestRunType .flutter,
172- cwd: cwd,
173- recursive: recursive,
174- collectCoverage: collectCoverage,
175- optimizePerformance: optimizePerformance,
176- ignore: ignore,
177- minCoverage: minCoverage,
178- excludeFromCoverage: excludeFromCoverage,
179- randomSeed: randomSeed,
180- forceAnsi: forceAnsi,
181- arguments: arguments,
182- stdout: stdout,
183- stderr: stderr,
184- buildGenerator: buildGenerator,
185- );
186- }
165+ }) async => TestCLIRunner .test (
166+ logger: logger,
167+ testType: TestRunType .flutter,
168+ cwd: cwd,
169+ recursive: recursive,
170+ collectCoverage: collectCoverage,
171+ optimizePerformance: optimizePerformance,
172+ ignore: ignore,
173+ minCoverage: minCoverage,
174+ excludeFromCoverage: excludeFromCoverage,
175+ randomSeed: randomSeed,
176+ forceAnsi: forceAnsi,
177+ arguments: arguments,
178+ stdout: stdout,
179+ stderr: stderr,
180+ buildGenerator: buildGenerator,
181+ );
187182}
188183
189184/// Ensures all git dependencies are reachable for the pubspec
@@ -274,17 +269,11 @@ extension on Duration {
274269}
275270
276271extension on int {
277- String formatSuccess () {
278- return this > 0 ? lightGreen.wrap ('+$this ' )! : '' ;
279- }
272+ String formatSuccess () => this > 0 ? lightGreen.wrap ('+$this ' )! : '' ;
280273
281- String formatFailure () {
282- return this > 0 ? lightRed.wrap ('-$this ' )! : '' ;
283- }
274+ String formatFailure () => this > 0 ? lightRed.wrap ('-$this ' )! : '' ;
284275
285- String formatSkipped () {
286- return this > 0 ? lightYellow.wrap ('~$this ' )! : '' ;
287- }
276+ String formatSkipped () => this > 0 ? lightYellow.wrap ('~$this ' )! : '' ;
288277}
289278
290279extension on String {
@@ -294,7 +283,6 @@ extension on String {
294283 return '...$truncated ' ;
295284 }
296285
297- String toSingleLine () {
298- return replaceAll ('\n ' , '' ).replaceAll (RegExp (r'\s\s+' ), ' ' );
299- }
286+ String toSingleLine () =>
287+ replaceAll ('\n ' , '' ).replaceAll (RegExp (r'\s\s+' ), ' ' );
300288}
0 commit comments