Migrate flutter_view example to new plugin API (#9096)

Ref: flutter/engine#3539
This commit is contained in:
Chris Bracken 2017-03-29 18:45:19 -07:00 committed by GitHub
parent 002ba64bc1
commit 2993ae8ddb

View file

@ -35,9 +35,9 @@ static NSString* const channel = @"increment";
if ([segue.identifier isEqualToString:@"FlutterViewControllerSegue"]) {
self.flutterViewController = segue.destinationViewController;
self.messageChannel = [FlutterMessageChannel messageChannelNamed:channel
binaryMessenger:self.flutterViewController
codec:[FlutterStringCodec sharedInstance]];
self.messageChannel = [FlutterMessageChannel messageChannelWithName:channel
binaryMessenger:self.flutterViewController
codec:[FlutterStringCodec sharedInstance]];
MainViewController* __weak weakSelf = self;
[self.messageChannel setMessageHandler:^(id message, FlutterReplyHandler replyHandler) {