mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-23 19:05:51 +00:00
make m1 mac (ipad mode) work in desktop mode
This commit is contained in:
parent
b2cb194c61
commit
3e34f18f9c
2 changed files with 8 additions and 0 deletions
|
@ -68,6 +68,9 @@ final openedFromSWBFileStringStateProvider =
|
||||||
void main() async {
|
void main() async {
|
||||||
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
||||||
GoogleFonts.config.allowRuntimeFetching = false;
|
GoogleFonts.config.allowRuntimeFetching = false;
|
||||||
|
if(Platform.isIOS){
|
||||||
|
Util.libraryPath = await getLibraryDirectory();
|
||||||
|
}
|
||||||
|
|
||||||
if (Util.isDesktop) {
|
if (Util.isDesktop) {
|
||||||
setWindowTitle('Stack Wallet');
|
setWindowTitle('Stack Wallet');
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
|
||||||
abstract class Util {
|
abstract class Util {
|
||||||
|
static Directory? libraryPath;
|
||||||
static bool get isDesktop {
|
static bool get isDesktop {
|
||||||
|
if(Platform.isIOS && libraryPath != null && !libraryPath!.path.contains("/var/mobile/")){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return Platform.isLinux || Platform.isMacOS || Platform.isWindows;
|
return Platform.isLinux || Platform.isMacOS || Platform.isWindows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue