initialize static method
Initializes the WindowManipulator class.
The enableWindowDelegate
specifies if the window delegate should be
enabled. It is required to be true
in order for
NSAppPresentationOptions or NSWindowDelegate to work. It is set to
false
by default in order to prevent incompatibility with other plugins.
Example:
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await WindowManipulator.initialize(enableWindowDelegate: true);
runApp(MyApp());
}
Implementation
static Future<void> initialize({bool enableWindowDelegate = false}) async {
await _windowManipulatorMethodChannel.invokeMethod('initialize', {
'enableWindowDelegate': enableWindowDelegate,
});
_completer.complete();
}