Skip to content

Commit 881b101

Browse files
committed
feat: enable device preview for web in demo environment
- Add kIsWeb condition to ensure DevicePreview runs only on web platform - Improve app performance by avoiding unnecessary initialization on mobile devices
1 parent 5c3382c commit 881b101

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void main() async {
2222
removeSplashFromWeb();
2323
}
2424

25-
if (appConfig.environment == AppEnvironment.demo) {
25+
if (appConfig.environment == AppEnvironment.demo && kIsWeb) {
2626
runApp(
2727
DevicePreview(
2828
enabled: true,

0 commit comments

Comments
 (0)