Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit ced28ed

Browse files
committed
final review comments
1 parent 7779b61 commit ced28ed

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

shell/platform/darwin/macos/framework/Headers/FlutterPlatformViews.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,13 @@
2020
*
2121
* The implementation of this method should create a new `NSView`.
2222
*
23-
* @param frame The rectangle for the newly created view measured in points.
2423
* @param viewId A unique identifier for this view.
2524
* @param args Parameters for creating the view sent from the Dart side of the
2625
* Flutter app. If `createArgsCodec` is not implemented, or if no creation arguments were sent from
2726
* the Dart code, this will be null. Otherwise this will be the value sent from the Dart code as
2827
* decoded by `createArgsCodec`.
2928
*/
30-
- (nonnull NSView*)createWithFrame:(CGRect)frame
31-
viewIdentifier:(int64_t)viewId
32-
arguments:(nullable id)args;
29+
- (nonnull NSView*)createWithviewIdentifier:(int64_t)viewId arguments:(nullable id)args;
3330

3431
/**
3532
* Returns the `FlutterMessageCodec` for decoding the args parameter of `createWithFrame`.

shell/platform/darwin/macos/framework/Source/FlutterMetalCompositor.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107

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

shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ - (void)onCreateWithViewID:(int64_t)viewId
4444
return;
4545
}
4646

47-
NSView* platform_view = [factory createWithFrame:CGRectZero viewIdentifier:viewId arguments:nil];
47+
NSView* platform_view = [factory createWithviewIdentifier:viewId arguments:nil];
4848
_platformViews[viewId] = platform_view;
4949
result(nil);
5050
}

shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.mm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ - (instancetype)initWithFrame:(CGRect)frame {
1717
@end
1818

1919
@implementation TestFlutterPlatformViewFactory
20-
- (NSView*)createWithFrame:(CGRect)frame
21-
viewIdentifier:(int64_t)viewId
22-
arguments:(nullable id)args {
23-
return [[TestFlutterPlatformView alloc] initWithFrame:frame];
20+
- (NSView*)createWithviewIdentifier:(int64_t)viewId arguments:(nullable id)args {
21+
return [[TestFlutterPlatformView alloc] initWithFrame:CGRectZero];
2422
}
2523

2624
- (NSObject<FlutterMessageCodec>*)createArgsCodec {

0 commit comments

Comments
 (0)