Commit 244a7a02 authored by Collin Jackson's avatar Collin Jackson Committed by GitHub

rename initWithFlutterView to initWithController (#9208)

parent 4a4d100b
......@@ -15,7 +15,7 @@
{{#withPluginHook}}
FlutterViewController *flutterController =
(FlutterViewController *)self.window.rootViewController;
_{{pluginProjectName}} = [[{{pluginClass}} alloc] initWithFlutterView:flutterController];
_{{pluginProjectName}} = [[{{pluginClass}} alloc] initWithController:flutterController];
{{/withPluginHook}}
return YES;
}
......
#import <Flutter/Flutter.h>
@interface {{pluginClass}} : NSObject
- initWithFlutterView:(FlutterViewController *)flutterView;
- initWithController:(FlutterViewController *)controller;
@end
......@@ -3,12 +3,12 @@
@implementation {{pluginClass}} {
}
- (instancetype)initWithFlutterView:(FlutterViewController *)flutterView {
- (instancetype)initWithController:(FlutterViewController *)controller {
self = [super init];
if (self) {
FlutterMethodChannel *channel = [FlutterMethodChannel
methodChannelWithName:@"{{projectName}}"
binaryMessenger:flutterView];
binaryMessenger:controller];
[channel setMethodCallHandler:^(FlutterMethodCall *call,
FlutterResultReceiver result) {
if ([@"getPlatformVersion" isEqualToString:call.method]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment