import 'package:eitc_erm_app/utils/logger.dart'; import 'package:flutter/services.dart'; import 'package:flutter/services.dart'; class NativeMethods { Future launchAndroid() async { const platform = MethodChannel('com.example.xcx_dashan_app/channel'); try { var result = await platform.invokeMethod('launchApp'); // var result = await platform.invokeMethod('launchAppOne',{'param1': "这是一个参数"}); // var result = await platform.invokeMethod('launchAppOne',{'param1': "这是一个参数",'param2': "这是一个参数"}); logd("结果$result"); } on PlatformException catch (e) { logd("Failed to invoke method: '${e.message}'."); } } }