forked from firka/flutter
[macOS] Fixed the platform view creation public method (flutter/engine#30996)
This commit is contained in:
@@ -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`.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user