| 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 16 of file FlutterView.mm.

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

## ◆ initWithDelegate:opaque:enableWideGamut:

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

Definition at line 16 of file FlutterView.mm.

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

## ◆ initWithFrame:

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

Definition at line 16 of file FlutterView.mm.

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

## ◆ NS_UNAVAILABLE [1/2]

+ (instancetype) NS_UNAVAILABLE |  |  |

## ◆ NS_UNAVAILABLE [2/2]

- (instancetype) NS_UNAVAILABLE |  |  |

## ◆ pixelFormat

- (MTLPixelFormat) pixelFormat |  |  |

Definition at line 16 of file FlutterView.mm.

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

## ◆ screen

- (UIScreen *) screen |  |  |

Definition at line 16 of file FlutterView.mm.

38 {
39 return self.window.windowScene.screen;
40 }

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