flutter_boost icon indicating copy to clipboard operation
flutter_boost copied to clipboard

iOS交互

Open SummerZZ100 opened this issue 7 years ago • 4 comments

怎么通过flutter_boost与原生iOS交互 传递信息

SummerZZ100 avatar Mar 27 '19 08:03 SummerZZ100

请使用Flutter 自带Method Channel

nightwolf-chen avatar Mar 27 '19 09:03 nightwolf-chen

请使用Flutter 自带Method Channel

我试了试总是报错,能给贴出来实例代码 万分感谢

SummerZZ100 avatar Mar 27 '19 09:03 SummerZZ100

请使用Flutter 自带Method Channel 能给出flutter_boost于iOS交互的实例代码吗 ,谢谢大神

SummerZZ100 avatar Mar 28 '19 07:03 SummerZZ100

[FlutterBoostPlugin.sharedInstance startFlutterWithPlatform:router onStart:^(FlutterViewController *vc) { FlutterMethodChannel *someChannel = [FlutterMethodChannel methodChannelWithName:@"com.alibb.sfs/ffse" binaryMessenger:vc]; [someChannel setMethodCallHandler:^(FlutterMethodCall * _Nonnull call, FlutterResult _Nonnull result) { if ([call.method isEqualToString:@"response"]) { NSLog(@"=======%@",call.arguments);

        }else {
            //                result(FlutterMethodNotImplemented);
        }
    }];
}];

SummerZZ100 avatar Apr 01 '19 08:04 SummerZZ100