import 'package:flutter/services.dart';

import 'package:flutter/services.dart';

class NativeMethods {

  Future<void> 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': "这是一个参数"});
      print("结果$result");
    } on PlatformException catch (e) {
      print("Failed to invoke method: '${e.message}'.");
    }
  }
}
