Flutter GTK 🧊

Implementation of GTK & Adwaita widgets in Flutter.

This project aims to provide a set of tools and widgets derived from the GTK library for GNU+Linux systems.

It allows the development of apps for Linux desktops, and provides a similiar user experience compared to 'native' GTK-based apps.

Note that this package IS IN DEVELOPMENT, and help from both the Flutter and GTK community will be pretty apreciated.

Example

You can find an example app within this project. It emulates the Clock app for GNOME.

Added to the example app is the bitsdojo_window package, that allows you add window controll buttons, such as maximize & close, as well as delete all window decorators, as reflected in this GitHub issue.

Widgets

AdwaitaHeaderBar

This widget implements the window header bar introduced in GTK 3.

You can place elements at the left, right or center of the panel.

There's also the posibility to rener the window control buttons, such as minimize, maximize & close.

AdwaitaHeaderBar(
  onMinimize: () => appWindow.minimize(),
  onMaximize: () => appWindow.maximizeOrRestore(),
  onClose: () => appWindow.close(),
  leading: AdwaitaHeaderButton(
    icon: Icons.add,
    onTap: () => null,
  ),
  center: AdwaitaViewSwitcher(
    tabs: [
      ViewSwitcherData(
        icon: Icons.language,
        title: 'World',
      ),
      // ...
    ],
  ),
  trailling: AdwaitaHeaderButton(
    icon: Icons.menu,
    onTap: () => null,
  )
)

AdwaitaViewSwitcher

This widget provides view switching functionality.

It looks and feel pretty similar to the HdyViewSwitcherBar component provided by libhandy.

AdwaitaViewSwitcher(
  tabs: [
    ViewSwitcherData(
      icon: Icons.language,
      title: 'World',
    ),
    // ...
  ]
)

AdwaitaHeaderButton

A simple icon button, that can also display text, that usually is display within a AdwaitaHeaderBar widget.

AdwaitaHeaderButton(
  icon: Icons.menu,
  onTap: () => null,
)

Getting Started

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Built with

Authors

License

This project is licensed under the GNU GPL v3 License - see the LICENSE file for details.

Libraries

colors
flutter_gtk
header_bar
header_button
index
index
index
separate
theme_picker
view_switcher
view_switcher_data
view_switcher_style
view_switcher_tab
window_control_button