Skip to content

Commit

Permalink
[adaptive_style] simplify example
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Iapicca committed Apr 28, 2024
1 parent 75d5508 commit b46a866
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions examples/adaptive_style_example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,11 @@ class MyHomePage extends StatelessWidget {
@override
Widget build(context) => SizeRefBuilder(builder: (context, sizeRef) {
return switch (sizeRef.size) {
(DeviceSize.iphoneSE) => Center(
child: SizedBox.fromSize(
size: sizeRef.size * sizeRef.scale.min,
child: Scaffold(
backgroundColor: Colors.black,
body: Center(
child: FlutterLogo(
size: 100 * sizeRef.scale.min,
),
),
(DeviceSize.iphoneSE) => Scaffold(
backgroundColor: Colors.black,
body: Center(
child: FlutterLogo(
size: 100 * sizeRef.scale.min,
),
),
),
Expand Down

0 comments on commit b46a866

Please sign in to comment.