| Flutter iOS Embedder |

Instance Methods | Class Methods | List of all members
FlutterView Class Reference

`#import <FlutterView.h>`

Inheritance diagram for FlutterView:

## Instance Methods
(instancetype) | - NS_UNAVAILABLE
(instancetype) | - initWithFrame:
(instancetype) | - initWithCoder:
(instancetype) | - initWithDelegate:opaque:enableWideGamut:
(UIScreen *) | - screen
(MTLPixelFormat) | - pixelFormat

## Class Methods
(instancetype) | + NS_UNAVAILABLE

## Detailed Description

Definition at line 32 of file FlutterView.h.

## Method Documentation

## ◆ initWithCoder:

- (instancetype) initWithCoder: |  | (NSCoder*) | NS_UNAVAILABLE |

Definition at line 14 of file FlutterView.mm.

31 :(NSCoder*)aDecoder {
32 NSAssert(NO, @"FlutterView must initWithDelegate");
33 return nil;
34 }

## ◆ initWithDelegate:opaque:enableWideGamut:

- (instancetype) initWithDelegate: |  | (id<FlutterViewEngineDelegate>) | delegate
opaque: |  | (BOOL) | opaque
enableWideGamut: |  | (BOOL) | NS_DESIGNATED_INITIALIZER

Definition at line 14 of file FlutterView.mm.

69 :(id<FlutterViewEngineDelegate>)delegate
70 opaque:(BOOL)opaque
71 enableWideGamut:(BOOL)isWideGamutEnabled {
72 if (delegate == nil) {
73 NSLog(@"FlutterView delegate was nil.");
74 return nil;
75 }
76
77 self = [super initWithFrame:CGRectNull];
78
79 if (self) {
80 _delegate = delegate;
81 _isWideGamutEnabled = isWideGamutEnabled;
82 self.layer.opaque = opaque;
83 }
84
85 return self;
86 }

## ◆ initWithFrame:

- (instancetype) initWithFrame: |  | (CGRect) | NS_UNAVAILABLE |

Definition at line 14 of file FlutterView.mm.

26 :(CGRect)frame {
27 NSAssert(NO, @"FlutterView must initWithDelegate");
28 return nil;
29 }

## ◆ NS_UNAVAILABLE [1/2]

+ (instancetype) NS_UNAVAILABLE |  |  |

## ◆ NS_UNAVAILABLE [2/2]

- (instancetype) NS_UNAVAILABLE |  |  |

## ◆ pixelFormat

- (MTLPixelFormat) pixelFormat |  |  |

Definition at line 14 of file FlutterView.mm.

43 {
44 if ([self.layer isKindOfClass:[CAMetalLayer class]]) {
45 // It is a known Apple bug that CAMetalLayer incorrectly reports its supported
46 // SDKs. It is, in fact, available since iOS 8.
47 #pragma clang diagnostic push
48 #pragma clang diagnostic ignored "-Wunguarded-availability-new"
49 CAMetalLayer* layer = (CAMetalLayer*)self.layer;
50 return layer.pixelFormat;
51 }
52 return MTLPixelFormatBGRA8Unorm;
53 }

## ◆ screen

- (UIScreen *) screen |  |  |

Definition at line 14 of file FlutterView.mm.

36 {
37 if (@available(iOS 13.0, *)) {
38 return self.window.windowScene.screen;
39 }
40 return UIScreen.mainScreen;
41 }

The documentation for this class was generated from the following files:

- shell/platform/darwin/ios/framework/Source/FlutterView.h
- shell/platform/darwin/ios/framework/Source/FlutterView.mm