diff --git a/client/pubspec.lock b/client/pubspec.lock index 0b814b425..e7e47ab41 100644 --- a/client/pubspec.lock +++ b/client/pubspec.lock @@ -435,6 +435,14 @@ packages: description: flutter source: sdk version: "0.0.0" + fullscreen_window: + dependency: transitive + description: + name: fullscreen_window + sha256: b3502f890a875de6cd300b06cfc542e089a324faef6c4fb5d5528f9e2ea68d8d + url: "https://pub.dev" + source: hosted + version: "1.1.0" geolocator: dependency: transitive description: @@ -1430,7 +1438,7 @@ packages: source: hosted version: "1.2.1" web: - dependency: transitive + dependency: "direct overridden" description: name: web sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 diff --git a/client/windows/flutter/generated_plugin_registrant.cc b/client/windows/flutter/generated_plugin_registrant.cc index be1578b39..1e7a9f0dd 100644 --- a/client/windows/flutter/generated_plugin_registrant.cc +++ b/client/windows/flutter/generated_plugin_registrant.cc @@ -7,6 +7,7 @@ #include "generated_plugin_registrant.h" #include +#include #include #include #include @@ -22,6 +23,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { AudioplayersWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("AudioplayersWindowsPlugin")); + FullscreenWindowPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FullscreenWindowPluginCApi")); GeolocatorWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("GeolocatorWindows")); MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar( diff --git a/client/windows/flutter/generated_plugins.cmake b/client/windows/flutter/generated_plugins.cmake index 61e94283e..eef7d0d50 100644 --- a/client/windows/flutter/generated_plugins.cmake +++ b/client/windows/flutter/generated_plugins.cmake @@ -4,6 +4,7 @@ list(APPEND FLUTTER_PLUGIN_LIST audioplayers_windows + fullscreen_window geolocator_windows media_kit_libs_windows_video media_kit_video diff --git a/packages/flet/lib/src/controls/page.dart b/packages/flet/lib/src/controls/page.dart index d26f530f6..4209837bb 100644 --- a/packages/flet/lib/src/controls/page.dart +++ b/packages/flet/lib/src/controls/page.dart @@ -11,6 +11,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_redux/flutter_redux.dart'; import 'package:redux/redux.dart'; +import 'package:fullscreen_window/fullscreen_window.dart'; import '../actions.dart'; import '../flet_app_context.dart'; @@ -486,7 +487,11 @@ class _PageControlState extends State with FletStoreMixin { // windowFullScreen if (windowFullScreen != null && windowFullScreen != _windowFullScreen) { - await setWindowFullScreen(windowFullScreen); + if (isDesktopPlatform()) { + await setWindowFullScreen(windowFullScreen); + } else { + FullScreenWindow.setFullScreen(windowFullScreen); + } _windowFullScreen = windowFullScreen; } diff --git a/packages/flet/pubspec.yaml b/packages/flet/pubspec.yaml index ddd43c345..fc16ed471 100644 --- a/packages/flet/pubspec.yaml +++ b/packages/flet/pubspec.yaml @@ -42,6 +42,10 @@ dependencies: path: ^1.8.2 js: ^0.6.5 fl_chart: ^0.69.0 + fullscreen_window: ^1.1.0 + +dependency_overrides: + web: ^1.0.0 dev_dependencies: flutter_test: