文章目录
IOS–>Flutter
xxx.m中
NSObject<FlutterBinaryMessenger>* _messenger;//自己找到messenger在哪
FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"back_page" binaryMessenger:_messenger];
[channel sendMessage:@"back"];
xxx.dart中
static const BasicMessageChannel<dynamic> messageChannel= const BasicMessageChannel("back_page", StandardMessageCodec());
messageChannel.setMessageHandler((dynamic value) {
//接收到信息
Navigator.pop(context);
});