@@ -3,6 +3,7 @@ import 'dart:async';
33import 'package:flutter/services.dart' ;
44import 'package:macos_window_utils/macos/ns_visual_effect_view_state.dart' ;
55import 'package:macos_window_utils/macos/ns_window_level.dart' ;
6+ import 'package:macos_window_utils/macos/ns_window_style_mask.dart' ;
67import 'package:macos_window_utils/macos/ns_window_toolbar_style.dart' ;
78import 'package:macos_window_utils/macos/visual_effect_view_properties.dart' ;
89import 'package:macos_window_utils/macos/ns_visual_effect_view_material.dart' ;
@@ -513,4 +514,36 @@ class WindowManipulator {
513514 await _completer.future;
514515 await _methodChannel.invokeMethod ('orderFrontRegardless' );
515516 }
517+
518+ /// Enables a flag that describes the window's current style, such as if it's
519+ /// resizable or in full-screen mode.
520+ ///
521+ /// Usage example:
522+ /// ```dart
523+ /// // Make window non-titled and borderless.
524+ /// WindowManipulator.removeFromStyleMask(NSWindowStyleMask.titled);
525+ /// WindowManipulator.insertIntoStyleMask(NSWindowStyleMask.borderless);
526+ /// ```
527+ static Future <void > insertIntoStyleMask (NSWindowStyleMask styleMask) async {
528+ await _completer.future;
529+ await _methodChannel.invokeMethod ('insertIntoStyleMask' , {
530+ 'styleMask' : styleMask.name,
531+ });
532+ }
533+
534+ /// Disables a flag that describes the window's current style, such as if it's
535+ /// resizable or in full-screen mode.
536+ ///
537+ /// Usage example:
538+ /// ```dart
539+ /// // Make window non-titled and borderless.
540+ /// WindowManipulator.removeFromStyleMask(NSWindowStyleMask.titled);
541+ /// WindowManipulator.insertIntoStyleMask(NSWindowStyleMask.borderless);
542+ /// ```
543+ static Future <void > removeFromStyleMask (NSWindowStyleMask styleMask) async {
544+ await _completer.future;
545+ await _methodChannel.invokeMethod ('removeFromStyleMask' , {
546+ 'styleMask' : styleMask.name,
547+ });
548+ }
516549}
0 commit comments