From 5e8cbd13cf91ce0096b2c94d26bea8e8f292c5aa Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Sun, 27 Feb 2022 18:08:16 -0800 Subject: [PATCH] Revert "Change FlutterViewController default opaque value to NO (#30664)" This reverts commit df562b8e2b7eb90b16876d4c50d7480c9294eb93. See https://github.com/flutter/flutter/issues/99249 --- .../ios/framework/Source/FlutterViewController.mm | 4 ++-- .../ios/framework/Source/FlutterViewControllerTest.mm | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) 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];