Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 79a0859

Browse files
author
a-wallen
committed
Set background when viewDidLoad
1 parent 89d6e7d commit 79a0859

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

shell/platform/darwin/macos/framework/Source/FlutterViewController.mm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,9 @@ - (void)loadView {
379379
}
380380
flutterView = [[FlutterView alloc] initWithMainContext:mainContext reshapeListener:self];
381381
}
382+
if (_backgroundColor != nil) {
383+
[flutterView setBackgroundColor:_backgroundColor];
384+
}
382385
FlutterViewWrapper* wrapperView = [[FlutterViewWrapper alloc] initWithFlutterView:flutterView];
383386
self.view = wrapperView;
384387
_flutterView = flutterView;
@@ -423,7 +426,7 @@ - (void)setMouseTrackingMode:(FlutterMouseTrackingMode)mode {
423426

424427
- (void)setBackgroundColor:(NSColor*)color {
425428
_backgroundColor = color;
426-
[(FlutterViewWrapper*)[self view] setBackgroundColor:_backgroundColor];
429+
[_flutterView setBackgroundColor:_backgroundColor];
427430
}
428431

429432
- (void)onPreEngineRestart {

0 commit comments

Comments
 (0)