This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +5
-9
lines changed
shell/platform/darwin/macos/framework Expand file tree Collapse file tree 4 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 20
20
*
21
21
* The implementation of this method should create a new `NSView`.
22
22
*
23
- * @param frame The rectangle for the newly created view measured in points.
24
23
* @param viewId A unique identifier for this view.
25
24
* @param args Parameters for creating the view sent from the Dart side of the
26
25
* Flutter app. If `createArgsCodec` is not implemented, or if no creation arguments were sent from
27
26
* the Dart code, this will be null. Otherwise this will be the value sent from the Dart code as
28
27
* decoded by `createArgsCodec`.
29
28
*/
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 ;
33
30
34
31
/* *
35
32
* Returns the `FlutterMessageCodec` for decoding the args parameter of `createWithFrame`.
Original file line number Diff line number Diff line change 107
107
108
108
void FlutterMetalCompositor::PresentPlatformView (const FlutterLayer* layer, size_t layer_position) {
109
109
// TODO (https://github.com/flutter/flutter/issues/96668)
110
+ // once the issue is fixed, this check will pass.
110
111
FML_DCHECK ([[NSThread currentThread ] isMainThread ])
111
112
<< " Must be on the main thread to present platform views" ;
112
113
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ - (void)onCreateWithViewID:(int64_t)viewId
44
44
return ;
45
45
}
46
46
47
- NSView * platform_view = [factory createWithFrame: CGRectZero viewIdentifier : viewId arguments: nil ];
47
+ NSView * platform_view = [factory createWithviewIdentifier : viewId arguments: nil ];
48
48
_platformViews[viewId] = platform_view;
49
49
result (nil );
50
50
}
Original file line number Diff line number Diff line change @@ -17,10 +17,8 @@ - (instancetype)initWithFrame:(CGRect)frame {
17
17
@end
18
18
19
19
@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];
24
22
}
25
23
26
24
- (NSObject <FlutterMessageCodec>*)createArgsCodec {
You can’t perform that action at this time.
0 commit comments