| commit | 244a7a02b52bdcacd53c3bdcaea6f5311c78c6aa | [log] [tgz] |
|---|---|---|
| author | Collin Jackson <jackson@google.com> | Wed Apr 05 08:21:36 2017 -0700 |
| committer | GitHub <noreply@github.com> | Wed Apr 05 08:21:36 2017 -0700 |
| tree | 0c6e2a253cacd95298ccce16b7661c8a70b484f3 | |
| parent | 4a4d100b91fb9fed3b1a260c06dcfa1ae8a359e8 [diff] |
rename initWithFlutterView to initWithController (#9208)
diff --git a/packages/flutter_tools/templates/create/ios.tmpl/Runner/AppDelegate.m.tmpl b/packages/flutter_tools/templates/create/ios.tmpl/Runner/AppDelegate.m.tmpl index de5dd48..6ba55b1 100644 --- a/packages/flutter_tools/templates/create/ios.tmpl/Runner/AppDelegate.m.tmpl +++ b/packages/flutter_tools/templates/create/ios.tmpl/Runner/AppDelegate.m.tmpl
@@ -15,7 +15,7 @@ {{#withPluginHook}} FlutterViewController *flutterController = (FlutterViewController *)self.window.rootViewController; - _{{pluginProjectName}} = [[{{pluginClass}} alloc] initWithFlutterView:flutterController]; + _{{pluginProjectName}} = [[{{pluginClass}} alloc] initWithController:flutterController]; {{/withPluginHook}} return YES; }
diff --git a/packages/flutter_tools/templates/plugin/ios.tmpl/Classes/pluginClass.h.tmpl b/packages/flutter_tools/templates/plugin/ios.tmpl/Classes/pluginClass.h.tmpl index e412050..819c2ef 100644 --- a/packages/flutter_tools/templates/plugin/ios.tmpl/Classes/pluginClass.h.tmpl +++ b/packages/flutter_tools/templates/plugin/ios.tmpl/Classes/pluginClass.h.tmpl
@@ -1,5 +1,5 @@ #import <Flutter/Flutter.h> @interface {{pluginClass}} : NSObject -- initWithFlutterView:(FlutterViewController *)flutterView; +- initWithController:(FlutterViewController *)controller; @end
diff --git a/packages/flutter_tools/templates/plugin/ios.tmpl/Classes/pluginClass.m.tmpl b/packages/flutter_tools/templates/plugin/ios.tmpl/Classes/pluginClass.m.tmpl index 3e3da38..e5e9c60 100644 --- a/packages/flutter_tools/templates/plugin/ios.tmpl/Classes/pluginClass.m.tmpl +++ b/packages/flutter_tools/templates/plugin/ios.tmpl/Classes/pluginClass.m.tmpl
@@ -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]) {