Navaron Bracke

format & analyze

@@ -3,7 +3,9 @@ import 'package:flutter_test/flutter_test.dart'; @@ -3,7 +3,9 @@ import 'package:flutter_test/flutter_test.dart';
3 import 'package:mobile_scanner/src/scan_window_calculation.dart'; 3 import 'package:mobile_scanner/src/scan_window_calculation.dart';
4 4
5 void main() { 5 void main() {
6 - group('Scan window relative to texture', () { 6 + group(
  7 + 'Scan window relative to texture',
  8 + () {
7 group('Widget (landscape) smaller than texture (portrait)', () { 9 group('Widget (landscape) smaller than texture (portrait)', () {
8 const textureSize = Size(480.0, 640.0); 10 const textureSize = Size(480.0, 640.0);
9 const widgetSize = Size(432.0, 256.0); 11 const widgetSize = Size(432.0, 256.0);
@@ -42,7 +44,12 @@ void main() { @@ -42,7 +44,12 @@ void main() {
42 test('wl tp: BoxFit.fitWidth', () { 44 test('wl tp: BoxFit.fitWidth', () {
43 ctx.testScanWindow( 45 ctx.testScanWindow(
44 BoxFit.fitWidth, 46 BoxFit.fitWidth,
45 - const Rect.fromLTRB(0.25, 0.38888888888888895, 0.75, 0.6111111111111112), 47 + const Rect.fromLTRB(
  48 + 0.25,
  49 + 0.38888888888888895,
  50 + 0.75,
  51 + 0.6111111111111112,
  52 + ),
46 ); 53 );
47 }); 54 });
48 55
@@ -50,7 +57,12 @@ void main() { @@ -50,7 +57,12 @@ void main() {
50 // equal to fitWidth 57 // equal to fitWidth
51 ctx.testScanWindow( 58 ctx.testScanWindow(
52 BoxFit.cover, 59 BoxFit.cover,
53 - const Rect.fromLTRB(0.25, 0.38888888888888895, 0.75, 0.6111111111111112), 60 + const Rect.fromLTRB(
  61 + 0.25,
  62 + 0.38888888888888895,
  63 + 0.75,
  64 + 0.6111111111111112,
  65 + ),
54 ); 66 );
55 }); 67 });
56 68
@@ -71,7 +83,8 @@ void main() { @@ -71,7 +83,8 @@ void main() {
71 }); 83 });
72 }); 84 });
73 85
74 - group('Widget (landscape) smaller than texture and texture (landscape)', () { 86 + group('Widget (landscape) smaller than texture and texture (landscape)',
  87 + () {
75 const textureSize = Size(640.0, 480.0); 88 const textureSize = Size(640.0, 480.0);
76 const widgetSize = Size(320.0, 120.0); 89 const widgetSize = Size(320.0, 120.0);
77 final ctx = ScanWindowTestContext( 90 final ctx = ScanWindowTestContext(
@@ -137,7 +150,8 @@ void main() { @@ -137,7 +150,8 @@ void main() {
137 ); 150 );
138 }); 151 });
139 }); 152 });
140 - }); 153 + },
  154 + );
141 } 155 }
142 156
143 class ScanWindowTestContext { 157 class ScanWindowTestContext {