mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-24 04:12:20 +08:00
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");
|
||||
|
||||
if (!isDesktop) {
|
||||
runMainApp(false);
|
||||
runMobileApp();
|
||||
return;
|
||||
}
|
||||
// main window
|
||||
@ -72,9 +72,6 @@ Future<void> initEnv(String appType) async {
|
||||
// focus on multi-ffi on desktop first
|
||||
await initGlobalFFI();
|
||||
// await Firebase.initializeApp();
|
||||
if (isAndroid) {
|
||||
toAndroidChannelInit();
|
||||
}
|
||||
refreshCurrentUser();
|
||||
}
|
||||
|
||||
@ -96,6 +93,12 @@ void runMainApp(bool startService) async {
|
||||
runApp(App());
|
||||
}
|
||||
|
||||
void runMobileApp() async {
|
||||
await initEnv(kAppTypeMain);
|
||||
if (isAndroid) androidChannelInit();
|
||||
runApp(App());
|
||||
}
|
||||
|
||||
void runRemoteScreen(Map<String, dynamic> argument) async {
|
||||
await initEnv(kAppTypeDesktopRemote);
|
||||
runApp(GetMaterialApp(
|
||||
|
@ -510,7 +510,7 @@ Widget clientInfo(Client client) {
|
||||
]));
|
||||
}
|
||||
|
||||
void toAndroidChannelInit() {
|
||||
void androidChannelInit() {
|
||||
gFFI.setMethodCallHandler((method, arguments) {
|
||||
debugPrint("flutter got android msg,$method,$arguments");
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user