setTitleBarVisibility static method

Future<void> setTitleBarVisibility({
  1. bool visibility = false,
  2. bool windowButtonVisibility = false,
})

Implementation

static Future<void> setTitleBarVisibility({
  bool visibility = false,
  bool windowButtonVisibility = false,
}) async {
  if (Dart.isDesktop == false) {
    return;
  }
  if (Dart.isWeb) {
    return;
  }

  await windowManager.setTitleBarStyle(
      visibility ? TitleBarStyle.normal : TitleBarStyle.hidden,
      windowButtonVisibility: windowButtonVisibility);
}