We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e03151 commit 278a0a4Copy full SHA for 278a0a4
lib/main.dart
@@ -1,3 +1,6 @@
1
+import 'package:flutter/foundation.dart';
2
+import 'package:flutter/material.dart';
3
+import 'package:device_preview/device_preview.dart';
4
import 'package:ht_main/app/config/config.dart';
5
import 'package:ht_main/bootstrap.dart';
6
@@ -12,5 +15,17 @@ void main() async {
12
15
AppEnvironment.development => AppConfig.development(),
13
16
AppEnvironment.demo => AppConfig.demo(),
14
17
};
- await bootstrap(appConfig);
18
+
19
+ final appWidget = await bootstrap(appConfig);
20
21
+ if (appConfig.environment == AppEnvironment.demo) {
22
+ runApp(
23
+ DevicePreview(
24
+ enabled: !kReleaseMode,
25
+ builder: (context) => appWidget,
26
+ ),
27
+ );
28
+ } else {
29
+ runApp(appWidget);
30
+ }
31
}
0 commit comments