handy_window 0.4.0 copy "handy_window: ^0.4.0" to clipboard
handy_window: ^0.4.0 copied to clipboard

PlatformLinux

This package enhances the looks of Flutter applications on Linux by providing modern-looking Handy windows with rounded bottom corners.

Handy Window #

pub

This package enhances the looks of Flutter applications on Linux by providing modern-looking Handy windows with rounded bottom corners.

Handy window Flutter window

NOTE: Handy windows are only available on Ubuntu 20.04 (GLib >= 2.58) and later.

Usage #

Add the dependency to pubspec.yaml:

dependencies:
  handy_window:

Modify linux/my_application.cc to register plugins before showing the Flutter window and view:

diff --git a/linux/my_application.cc b/linux/my_application.cc
index fa74baa..3133755 100644
--- a/linux/my_application.cc
+++ b/linux/my_application.cc
@@ -48,17 +48,17 @@ static void my_application_activate(GApplication* application) {
   }
 
   gtk_window_set_default_size(window, 1280, 720);
-  gtk_widget_show(GTK_WIDGET(window));
 
   g_autoptr(FlDartProject) project = fl_dart_project_new();
   fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
 
   FlView* view = fl_view_new(project);
-  gtk_widget_show(GTK_WIDGET(view));
   gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
 
   fl_register_plugins(FL_PLUGIN_REGISTRY(view));
 
+  gtk_widget_show(GTK_WIDGET(window));
+  gtk_widget_show(GTK_WIDGET(view));
   gtk_widget_grab_focus(GTK_WIDGET(view));
 }
27
likes
160
pub points
90%
popularity

Publisher

verified publisherubuntu.com

This package enhances the looks of Flutter applications on Linux by providing modern-looking Handy windows with rounded bottom corners.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MPL-2.0 (license)

Dependencies

flutter

More

Packages that depend on handy_window