Skip to content

Commit 0fd1768

Browse files
committed
Constrain torch unavailable example icon
1 parent 58dfefe commit 0fd1768

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

example/lib/scanner_button_widgets.dart

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,12 @@ class ToggleFlashlightButton extends StatelessWidget {
167167
},
168168
);
169169
case TorchState.unavailable:
170-
return const SizedBox(
171-
width: 48.0,
172-
child: Center(
173-
child: Icon(
174-
Icons.no_flash,
175-
size: 32.0,
176-
color: Colors.grey,
177-
),
170+
return const SizedBox.square(
171+
dimension: 48.0,
172+
child: Icon(
173+
Icons.no_flash,
174+
size: 32.0,
175+
color: Colors.grey,
178176
),
179177
);
180178
}

0 commit comments

Comments
 (0)