check if its PWA
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user