diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index e1399d4cd9d9c..08f44786fb04e 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -120,7 +120,7 @@ - (instancetype)initWithEngine:(FlutterEngine*)engine NSAssert(engine != nil, @"Engine is required"); self = [super initWithNibName:nibName bundle:nibBundle]; if (self) { - _viewOpaque = NO; + _viewOpaque = YES; if (engine.viewController) { FML_LOG(ERROR) << "The supplied FlutterEngine " << [[engine description] UTF8String] << " is already used with FlutterViewController instance " @@ -203,7 +203,7 @@ - (void)sharedSetupWithProject:(nullable FlutterDartProject*)project return; } - _viewOpaque = NO; + _viewOpaque = YES; _weakFactory = std::make_unique>(self); _engine = std::move(engine); _flutterView.reset([[FlutterView alloc] initWithDelegate:_engine opaque:self.isViewOpaque]); diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm index e9527d72c16db..a91101c36807b 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm @@ -168,16 +168,6 @@ - (void)tearDown { self.messageSent = nil; } -- (void)testFlutterViewControllerViewOpaue { - FlutterEngine* mockEngine = OCMPartialMock([[FlutterEngine alloc] init]); - [mockEngine createShell:@"" libraryURI:@"" initialRoute:nil]; - FlutterViewController* viewController = [[FlutterViewController alloc] initWithEngine:mockEngine - nibName:nil - bundle:nil]; - // The FlutterViewController's FlutterViewLayer Opaque default is NO - XCTAssertFalse(viewController.isViewOpaque); -} - - (void)testkeyboardWillChangeFrameWillStartKeyboardAnimation { FlutterEngine* mockEngine = OCMPartialMock([[FlutterEngine alloc] init]); [mockEngine createShell:@"" libraryURI:@"" initialRoute:nil];