Skip to content

Commit 05f45e9

Browse files
committed
feat: add WASM support to TopMenu and build script
1 parent 21dc888 commit 05f45e9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/widgets/top_menu.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,15 @@ class TopMenu extends StatelessWidget {
6161
),
6262
),
6363
const Spacer(),
64+
if (isRunningWithWasm) ...[
65+
Text('(WASM)'),
66+
],
6467
],
6568
),
6669
);
6770
},
6871
);
6972
}
7073
}
74+
75+
const isRunningWithWasm = bool.fromEnvironment('dart.tool.dart2wasm');

scripts/build_github_pages.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ void main(List<String> args) async {
1919
final buildArgs = [
2020
'build',
2121
'web',
22-
'--wasm'
2322
'--base-href=$baseHref',
2423
if (isRelease) '--release',
24+
'--wasm'
2525
];
2626

2727
final buildResult = await Process.run(

0 commit comments

Comments
 (0)