| Flutter iOS Embedder |

Instance Methods | Class Methods | Properties | 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

## Properties
BOOL | forceSoftwareRendering

## Detailed Description

Definition at line 33 of file FlutterView.h.

## Method Documentation

## ◆ initWithCoder:

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

Definition at line 13 of file FlutterView.mm.

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

## ◆ initWithDelegate:opaque:enableWideGamut:

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

Definition at line 13 of file FlutterView.mm.

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

## ◆ initWithFrame:

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

Definition at line 13 of file FlutterView.mm.

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

## ◆ NS_UNAVAILABLE [1/2]

+ (instancetype) NS_UNAVAILABLE |  |  |

## ◆ NS_UNAVAILABLE [2/2]

- (instancetype) NS_UNAVAILABLE |  |  |

## ◆ pixelFormat

- (MTLPixelFormat) pixelFormat |  |  |

Definition at line 13 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 13 of file FlutterView.mm.

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

## Property Documentation

## ◆ forceSoftwareRendering

- (BOOL) forceSoftwareRendering
| read write nonatomic assign

Definition at line 48 of file FlutterView.h.

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