Skip to content

Commit

Permalink
[macOS] Fixed the platform view creation public method (flutter#30996)
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik authored Jan 22, 2022
1 parent ebd29af commit 9ba7fdf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
8 changes: 4 additions & 4 deletions shell/platform/darwin/macos/framework/Source/FlutterEngine.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -99,7 +99,7 @@ - (void)loadAOTData:(NSString*)assetsDir;
/**
* Creates a platform view channel and sets up the method handler.
*/
- (void)setupPlatformViewChannel;
- (void)setUpPlatformViewChannel;

@end

Expand Down Expand Up @@ -239,7 +239,7 @@ - (instancetype)initWithName:(NSString*)labelPrefix
object:nil];

_platformViewController = [[FlutterPlatformViewController alloc] init];
[self setupPlatformViewChannel];
[self setUpPlatformViewChannel];

return self;
}
Expand Down Expand Up @@ -656,7 +656,7 @@ - (void)shutDownEngine {
_engine = nullptr;
}

- (void)setupPlatformViewChannel {
- (void)setUpPlatformViewChannel {
_platformViewsChannel =
[FlutterMethodChannel methodChannelWithName:@"flutter/platform_views"
binaryMessenger:self.binaryMessenger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ - (void)onCreateWithViewID:(int64_t)viewId
return;
}

NSView* platform_view = [factory createWithviewIdentifier:viewId arguments:nil];
NSView* platform_view = [factory createWithViewIdentifier:viewId arguments:nil];
_platformViews[viewId] = platform_view;
result(nil);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ - (instancetype)initWithFrame:(CGRect)frame {
@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];
}

Expand Down

0 comments on commit 9ba7fdf

Please sign in to comment.