Skip to content

Commit

Permalink
final review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Jan 20, 2022
1 parent 7779b61 commit ced28ed
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@
*
* The implementation of this method should create a new `NSView`.
*
* @param frame The rectangle for the newly created view measured in points.
* @param viewId A unique identifier for this view.
* @param args Parameters for creating the view sent from the Dart side of the
* Flutter app. If `createArgsCodec` is not implemented, or if no creation arguments were sent from
* the Dart code, this will be null. Otherwise this will be the value sent from the Dart code as
* decoded by `createArgsCodec`.
*/
- (nonnull NSView*)createWithFrame:(CGRect)frame
viewIdentifier:(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
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@

void FlutterMetalCompositor::PresentPlatformView(const FlutterLayer* layer, size_t layer_position) {
// TODO (https://github.com/flutter/flutter/issues/96668)
// once the issue is fixed, this check will pass.
FML_DCHECK([[NSThread currentThread] isMainThread])
<< "Must be on the main thread to present platform views";

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 createWithFrame:CGRectZero viewIdentifier: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,10 +17,8 @@ - (instancetype)initWithFrame:(CGRect)frame {
@end

@implementation TestFlutterPlatformViewFactory
- (NSView*)createWithFrame:(CGRect)frame
viewIdentifier:(int64_t)viewId
arguments:(nullable id)args {
return [[TestFlutterPlatformView alloc] initWithFrame:frame];
- (NSView*)createWithviewIdentifier:(int64_t)viewId arguments:(nullable id)args {
return [[TestFlutterPlatformView alloc] initWithFrame:CGRectZero];
}

- (NSObject<FlutterMessageCodec>*)createArgsCodec {
Expand Down

0 comments on commit ced28ed

Please sign in to comment.