check if its PWA

This commit is contained in:
2024-09-11 12:00:36 +02:00
parent b161d5b4b5
commit 67958dae42
4 changed files with 105 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'dart:io' show Platform;
import "package:universal_html/html.dart" as html;
class MyTheme {
late int _mainColor;
@@ -29,19 +29,6 @@ class MyTheme {
//_mesColor = 0xffc8c8c8d9;
}
String getPlateform() {
if (kIsWeb) {
return "Web";
}
if (Platform.isAndroid) {
return "Android";
} else if (Platform.isIOS) {
return "IOS";
} else {
return "Other";
}
}
ThemeData getData() {
return ThemeData(
fontFamily: 'Segoe UI',
@@ -87,6 +74,10 @@ class MyTheme {
));
}
bool isPwa() {
return html.window.matchMedia('(display-mode: standalone)').matches;
}
void setMode(String m) {
mode;
}