diff --git a/flutter/lib/main.dart b/flutter/lib/main.dart index 39a1e66..a4f99ca 100644 --- a/flutter/lib/main.dart +++ b/flutter/lib/main.dart @@ -1,21 +1,21 @@ import 'package:graphs/pages/drawing_page.dart'; -//import 'package:desktop_window/desktop_window.dart'; +import 'package:desktop_window/desktop_window.dart'; import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } -/*Future setupWindow() async { - await DesktopWindow.setMinWindowSize(const Size(850, 620)); -}*/ +Future setupWindow() async { + await DesktopWindow.setMinWindowSize(const Size(850, 700)); +} class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { - //setupWindow(); + setupWindow(); return const MaterialApp( title: "Graphs", home: DrawingPage(), diff --git a/flutter/pubspec.lock b/flutter/pubspec.lock index 2afd2a3..2c88394 100644 --- a/flutter/pubspec.lock +++ b/flutter/pubspec.lock @@ -57,6 +57,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.3" + desktop_window: + dependency: "direct main" + description: + name: desktop_window + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" fake_async: dependency: transitive description: diff --git a/flutter/pubspec.yaml b/flutter/pubspec.yaml index 6debc09..0521526 100644 --- a/flutter/pubspec.yaml +++ b/flutter/pubspec.yaml @@ -35,7 +35,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - #desktop_window: ^0.4.0 + desktop_window: ^0.4.0 dev_dependencies: flutter_test: diff --git a/flutter/windows/flutter/generated_plugin_registrant.cc b/flutter/windows/flutter/generated_plugin_registrant.cc index 8b6d468..1923f29 100644 --- a/flutter/windows/flutter/generated_plugin_registrant.cc +++ b/flutter/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,9 @@ #include "generated_plugin_registrant.h" +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + DesktopWindowPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("DesktopWindowPlugin")); } diff --git a/flutter/windows/flutter/generated_plugins.cmake b/flutter/windows/flutter/generated_plugins.cmake index 4d10c25..c2629e8 100644 --- a/flutter/windows/flutter/generated_plugins.cmake +++ b/flutter/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + desktop_window ) set(PLUGIN_BUNDLED_LIBRARIES)