Skip to content

Commit

Permalink
Conditionally display WASM indicator only on web
Browse files Browse the repository at this point in the history
  • Loading branch information
JaffaKetchup committed Sep 12, 2024
1 parent 3c38297 commit 5b51677
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions example/lib/widgets/drawer/menu_drawer.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_map_example/pages/animated_map_controller.dart';
import 'package:flutter_map_example/pages/bundled_offline_map.dart';
Expand Down Expand Up @@ -63,11 +64,12 @@ class MenuDrawer extends StatelessWidget {
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14),
),
const Text(
_isWASM ? 'Running with WASM' : 'Running without WASM',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14),
),
if (kIsWeb)
const Text(
_isWASM ? 'Running with WASM' : 'Running without WASM',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14),
),
],
),
),
Expand Down

0 comments on commit 5b51677

Please sign in to comment.