fix mobile build
This commit is contained in:
parent
75b04b9af1
commit
91f2106037
@ -27,7 +27,7 @@ Future<Null> main(List<String> args) async {
|
|||||||
print("launch args: $args");
|
print("launch args: $args");
|
||||||
|
|
||||||
if (!isDesktop) {
|
if (!isDesktop) {
|
||||||
runMainApp(false);
|
runMobileApp();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// main window
|
// main window
|
||||||
@ -72,9 +72,6 @@ Future<void> initEnv(String appType) async {
|
|||||||
// focus on multi-ffi on desktop first
|
// focus on multi-ffi on desktop first
|
||||||
await initGlobalFFI();
|
await initGlobalFFI();
|
||||||
// await Firebase.initializeApp();
|
// await Firebase.initializeApp();
|
||||||
if (isAndroid) {
|
|
||||||
toAndroidChannelInit();
|
|
||||||
}
|
|
||||||
refreshCurrentUser();
|
refreshCurrentUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,6 +93,12 @@ void runMainApp(bool startService) async {
|
|||||||
runApp(App());
|
runApp(App());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void runMobileApp() async {
|
||||||
|
await initEnv(kAppTypeMain);
|
||||||
|
if (isAndroid) androidChannelInit();
|
||||||
|
runApp(App());
|
||||||
|
}
|
||||||
|
|
||||||
void runRemoteScreen(Map<String, dynamic> argument) async {
|
void runRemoteScreen(Map<String, dynamic> argument) async {
|
||||||
await initEnv(kAppTypeDesktopRemote);
|
await initEnv(kAppTypeDesktopRemote);
|
||||||
runApp(GetMaterialApp(
|
runApp(GetMaterialApp(
|
||||||
|
@ -510,7 +510,7 @@ Widget clientInfo(Client client) {
|
|||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
void toAndroidChannelInit() {
|
void androidChannelInit() {
|
||||||
gFFI.setMethodCallHandler((method, arguments) {
|
gFFI.setMethodCallHandler((method, arguments) {
|
||||||
debugPrint("flutter got android msg,$method,$arguments");
|
debugPrint("flutter got android msg,$method,$arguments");
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user