-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert
MainFlutterWindow.swift
to its default state in example
- Loading branch information
1 parent
24fe66e
commit 9f09f88
Showing
1 changed file
with
9 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
import Cocoa | ||
import FlutterMacOS | ||
import macos_window_utils | ||
|
||
class MainFlutterWindow: NSWindow { | ||
override func awakeFromNib() { | ||
let windowFrame = self.frame | ||
let macOSWindowUtilsViewController = MacOSWindowUtilsViewController() // new | ||
self.contentViewController = macOSWindowUtilsViewController // new | ||
self.setFrame(windowFrame, display: true) | ||
|
||
/* Initialize the macos_window_utils plugin */ | ||
MainFlutterWindowManipulator.start(mainFlutterWindow: self) // new | ||
|
||
RegisterGeneratedPlugins(registry: macOSWindowUtilsViewController.flutterViewController) // new | ||
override func awakeFromNib() { | ||
let flutterViewController = FlutterViewController.init() | ||
let windowFrame = self.frame | ||
self.contentViewController = flutterViewController | ||
self.setFrame(windowFrame, display: true) | ||
|
||
super.awakeFromNib() | ||
} | ||
RegisterGeneratedPlugins(registry: flutterViewController) | ||
|
||
super.awakeFromNib() | ||
} | ||
} |