convert mih web app from JS to WASm
This commit is contained in:
parent
eb213b01b6
commit
f9c71b656e
17 changed files with 78 additions and 127 deletions
13
mih_ui/lib/mih_helpers/mih_install_web.dart
Normal file
13
mih_ui/lib/mih_helpers/mih_install_web.dart
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import 'dart:js_interop';
|
||||
|
||||
@JS('promptInstall')
|
||||
external void jsPromptInstall();
|
||||
|
||||
@JS('isInstallPromptAvailable')
|
||||
external bool jsIsInstallPromptAvailable();
|
||||
|
||||
void triggerWebInstall() {
|
||||
if (jsIsInstallPromptAvailable()) {
|
||||
jsPromptInstall();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue