[macOS] Fixed the platform view creation public method (flutter/engine#30996)

This commit is contained in:
Kaushik Iska
2022-01-22 08:31:22 -08:00
committed by GitHub
parent a909b20a1d
commit e1e26a5aff
4 changed files with 7 additions and 7 deletions

View File

@@ -26,7 +26,7 @@
* the Dart code, this will be null. Otherwise this will be the value sent from the Dart code as
* decoded by `createArgsCodec`.
*/
- (nonnull NSView*)createWithviewIdentifier:(int64_t)viewId arguments:(nullable id)args;
- (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable id)args;
/**
* Returns the `FlutterMessageCodec` for decoding the args parameter of `createWithFrame`.

View File

@@ -18,7 +18,7 @@
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterRenderingBackend.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController_Internal.h"
#import "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/embedder/embedder.h"
/**
* Constructs and returns a FlutterLocale struct corresponding to |locale|, which must outlive
@@ -99,7 +99,7 @@ static FlutterLocale FlutterLocaleFromNSLocale(NSLocale* locale) {
/**
* Creates a platform view channel and sets up the method handler.
*/
- (void)setupPlatformViewChannel;
- (void)setUpPlatformViewChannel;
@end
@@ -239,7 +239,7 @@ static void OnPlatformMessage(const FlutterPlatformMessage* message, FlutterEngi
object:nil];
_platformViewController = [[FlutterPlatformViewController alloc] init];
[self setupPlatformViewChannel];
[self setUpPlatformViewChannel];
return self;
}
@@ -656,7 +656,7 @@ static void OnPlatformMessage(const FlutterPlatformMessage* message, FlutterEngi
_engine = nullptr;
}
- (void)setupPlatformViewChannel {
- (void)setUpPlatformViewChannel {
_platformViewsChannel =
[FlutterMethodChannel methodChannelWithName:@"flutter/platform_views"
binaryMessenger:self.binaryMessenger

View File

@@ -44,7 +44,7 @@
return;
}
NSView* platform_view = [factory createWithviewIdentifier:viewId arguments:nil];
NSView* platform_view = [factory createWithViewIdentifier:viewId arguments:nil];
_platformViews[viewId] = platform_view;
result(nil);
}

View File

@@ -17,7 +17,7 @@
@end
@implementation TestFlutterPlatformViewFactory
- (NSView*)createWithviewIdentifier:(int64_t)viewId arguments:(nullable id)args {
- (NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable id)args {
return [[TestFlutterPlatformView alloc] initWithFrame:CGRectZero];
}