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

Commit 62dcd0c

Browse files
author
a-wallen
committed
Set background when viewDidLoad
1 parent 5266af3 commit 62dcd0c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@ - (void)loadView {
382382
}
383383
flutterView = [[FlutterView alloc] initWithMainContext:mainContext reshapeListener:self];
384384
}
385+
if (_backgroundColor != nil) {
386+
[flutterView setBackgroundColor:_backgroundColor];
387+
}
385388
FlutterViewWrapper* wrapperView = [[FlutterViewWrapper alloc] initWithFlutterView:flutterView];
386389
self.view = wrapperView;
387390
_flutterView = flutterView;
@@ -426,7 +429,7 @@ - (void)setMouseTrackingMode:(FlutterMouseTrackingMode)mode {
426429

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

432435
- (void)onPreEngineRestart {

0 commit comments

Comments
 (0)