mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 21:07:24 +00:00
fix init
This commit is contained in:
@@ -48,18 +48,20 @@ class _App {
|
|||||||
init() async {
|
init() async {
|
||||||
cachePath = (await getApplicationCacheDirectory()).path;
|
cachePath = (await getApplicationCacheDirectory()).path;
|
||||||
dataPath = (await getApplicationSupportDirectory()).path;
|
dataPath = (await getApplicationSupportDirectory()).path;
|
||||||
final deviceInfoPlugin = DeviceInfoPlugin();
|
if (App.isWindows) {
|
||||||
final deviceInfo = await deviceInfoPlugin.windowsInfo;
|
final deviceInfoPlugin = DeviceInfoPlugin();
|
||||||
if (deviceInfo.majorVersion <= 6) {
|
final deviceInfo = await deviceInfoPlugin.windowsInfo;
|
||||||
if (deviceInfo.minorVersion < 2) {
|
if (deviceInfo.majorVersion <= 6) {
|
||||||
_windowsVersion = 7;
|
if (deviceInfo.minorVersion < 2) {
|
||||||
|
_windowsVersion = 7;
|
||||||
|
} else {
|
||||||
|
_windowsVersion = 8;
|
||||||
|
}
|
||||||
|
} else if (deviceInfo.buildNumber < 22000) {
|
||||||
|
_windowsVersion = 10;
|
||||||
} else {
|
} else {
|
||||||
_windowsVersion = 8;
|
_windowsVersion = 11;
|
||||||
}
|
}
|
||||||
} else if (deviceInfo.buildNumber < 22000) {
|
|
||||||
_windowsVersion = 10;
|
|
||||||
} else {
|
|
||||||
_windowsVersion = 11;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user