Viewing version 1.0.0-rc.8. Open the latest package page.
gtk
1.0.0-rc.8Implements GTK Widgets, themes and titlebar buttons in Flutter. Based on the GNOME HIG
Readme
GTK ❤️ Flutter
Unofficial implementation of GTK Widgets and libadwaita in Flutter. Based on the GNOME Human Interface Guidelines.
GTK+Flutter example screenshot
NOTE: For getting colors from gtk 3.0 theme use version <=0.9.8+1
Features
- Libadwaita colors implemented
- Various GTK widgets ported to flutter
- Compatible with various packages
Usage
- To get color from theme you can use
Theme.of(context).[color]like usual. E.g.Theme.of(context).tiles. - Following colors are available:
tiles- List rows, tilesmenus- Menus, popoverssidebars- Header bars, active tabs, message dialogs, sidebarsviewSwitcher- View switchertextColor- Text, icons colorfgColor- Foreground areas, bordersbgColor- Background areasinactiveTabs- Inactive tabsborder- Border
- If you want custom titlebar then you can follow the steps for that on
bitsdojo_windowpackage. - Following Widgets are currently ported to flutter:
GtkContainerGtkHeaderBarGtkHeaderBarMinimalGtkHeaderButtonGtkPopupMenuGtkSidebarGtkTwoPaneGtkViewSwitcherGtkViewSwitcherTab
See the example app in the example folder.
Additional information
This package is dependent on
popoverfor GtkPopover.window_decorationsfor Window Decorations (doesn't needed if you useGtkHeaderBarMinimal)
Optional packages to use with this package:
adwaita_iconsfor Adwaita Iconsbitsdojo_windowfor better look and feel with custom GtkHeaderBar.bitsdojonativeshellfor better look and feel with custom GtkHeaderBar.nativeshell
License
LGPL v3 / GNU LESSER GENERAL PUBLIC LICENSE v3
TLDR;
Changelog
1.0.0-rc.8
- Fix canvasColor not working
1.0.0-rc.7
- Add documentation for colors in libadwaita_theme
- Add adwaitaLight and adwaitaDark for LibAdwaita Theme
1.0.0-rc.6
GnomeThemeis now deprecated, useTheme.of(context).[color]to get whatever color you want.
1.0.0-rc.5
- Get native window button placement by using gsetting schema
1.0.0-rc.4
- Made width nullable and fix defaults for
GtkContainer - Update Screenshot
1.0.0-rc.3
- Fix ViewSwitcher color
- Add
GtkContainercustom widget - Add new example app
- Fix gtk sidebar item bg color
1.0.0-rc.2
- Fix error when no leading icon was provided for the sidebar
- Rename
gtk_colors.darttogtk_theme.dartand moved it to the widgets directory - Fix imports in the files
1.0.0-rc.1
- Remove gnomeTheme parameter requirement for gtk_sidebar
- Add details about paramters of
GnomeTheme.of(context)
1.0.0-rc.0
- Use color schemes from libadwaita
0.9.8+1
- Remove dead code
0.9.8
- Add riverpod example
- Fix selected and unselected color for gtk sidebar
- Fix initial color parsing
0.9.5
- Fix instructions on how to use window decoration
- Update README and screenshot
0.9.0
- Update gsettings to latest version
- Fix native theme picker by @MalcolmMielle
- Made Window Decorations a seperate package to keep this package lightweight
0.8.5
- Use NavigationToolbar instead of Stack to center widget.
0.8.0
- Update example
- Add expanded and height property to GtkViewSwitcher
0.7.0+1
- Fix Padding of Icons with Gtk header button
- Update
titlebarSpaceandpaddingforGtkHeaderBar
0.7.0
- Add GtkViewSwitcher from
flutter_gtkpackage - Fix Double tap on header buttons doesn't work.
- Change default padding for header
0.6.0
- Remove
adwaita_iconsfrom dependency of example - Revamp code for
GtkSidebar.
0.5.5
- Remove
adwaita_iconsfrom dependency - Add default values for onClose, onMinimize and onMaximize for GtkHeaderBar.bitsdojo and .nativeshell.
- Add titlebarSpace property to adjust the space b/w titlebar and trailing items.
0.5.0+1
- Rename beignDrag to performDrag for nativeshell Gtk Header.
0.5.0
- Add onDoubleTap and onHeaderDrag method for GtkHeaderBar
- Add padding and height parameter to GtkHeaderBar
- Add GtkHeaderBar.bitsdojo and GtkHeaderBar.nativeshell to integerate well with these plugins
0.4.0+1
- Update Screenshot
0.4.0
- Add auto detect gtk theme using GtkColorType.system by @MalcolmMielle
- Update Window Decorations plugin
- Add isActive parameter to Gtk popup button
0.2.3
- Change children to body for GtkPopupMenu
- Update Documentation and comments
- Update get Gtk color logic
- Update example by adding bitsdojo_window
- Update Screenshot
0.2.0+2
- Fix typo in README
- Add Screenshot in README
0.2.0+1
- Update github homepage
0.2.0
- Remove
bitsdojo_windowdependency
0.1.0+1
- Fix Readme
0.1.0
- initial release.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'gtk:1.0.0-rc.8'pubspec.yaml
name: gtk
description: Implements GTK Widgets, themes and titlebar buttons in Flutter. Based on the GNOME HIG
version: 1.0.0-rc.8
homepage: https://github.com/prateekmedia/gtk-flutter
environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.17.0"
dependencies:
flutter:
sdk: flutter
dbus: ">=0.6.3 <1.0.0"
gsettings: ">=0.2.0 <1.0.0"
popover: ">=0.2.6+2 <1.0.0"
dev_dependencies:
flutter_lints: ">=1.0.0 <2.0.0"
flutter:
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | Cached · Upstream SHA-256 matched | Download | ef9b882f…1b26b5 |
| 0.1.0+1 | Cached · Upstream SHA-256 matched | Download | ca70f6c3…d794a3 |
| 0.2.0 | Cached · Upstream SHA-256 matched | Download | 8045cff8…7ff973 |
| 0.2.0+1 | Cached · Upstream SHA-256 matched | Download | b38fde1b…72f4d7 |
| 0.2.0+2 | Cached · Upstream SHA-256 matched | Download | 9a333a93…de735c |
| 0.2.3 | Cached · Upstream SHA-256 matched | Download | 79a5c345…eb6800 |
| 0.4.0 | Cached · Upstream SHA-256 matched | Download | 396a38f0…03acbd |
| 0.4.0+1 | Cached · Upstream SHA-256 matched | Download | 5b4921bb…f62e08 |
| 0.5.0 | Cached · Upstream SHA-256 matched | Download | f1de0c93…5c7475 |
| 0.5.0+1 | Cached · Upstream SHA-256 matched | Download | 5a6b4cf3…c39329 |
| 0.5.5 | Cached · Upstream SHA-256 matched | Download | 3f7ae581…14d771 |
| 0.6.0 | Cached · Upstream SHA-256 matched | Download | 03bf5785…4792b5 |
| 0.7.0 | Cached · Upstream SHA-256 matched | Download | 32b68ce0…5c69c8 |
| 0.7.0+1 | Cached · Upstream SHA-256 matched | Download | 17067a52…62d9b2 |
| 0.8.0 | Cached · Upstream SHA-256 matched | Download | 3b802bc6…f6581d |
| 0.8.5 | Cached · Upstream SHA-256 matched | Download | 201e5323…8af9a4 |
| 0.9.0 | Cached · Upstream SHA-256 matched | Download | c50ba547…857b5d |
| 0.9.5 | Cached · Upstream SHA-256 matched | Download | 4e386c43…a7555b |
| 0.9.8 | Cached · Upstream SHA-256 matched | Download | d66096f7…5a58eb |
| 0.9.8+1 | Cached · Upstream SHA-256 matched | Download | 4d1be563…7e6288 |
| 1.0.0-rc.0 | Cached · Upstream SHA-256 matched | Download | 8771c670…bb2b81 |
| 1.0.0-rc.1 | Cached · Upstream SHA-256 matched | Download | a88f7144…1e5a5d |
| 1.0.0-rc.2 | Cached · Upstream SHA-256 matched | Download | b8c40027…6f6189 |
| 1.0.0-rc.3 | Cached · Upstream SHA-256 matched | Download | 5b240b07…6435ce |
| 1.0.0-rc.4 | Cached · Upstream SHA-256 matched | Download | 4ce226e7…3b905c |
| 1.0.0-rc.5 | Cached · Upstream SHA-256 matched | Download | b2c42722…92e88c |
| 1.0.0-rc.6 | Cached · Upstream SHA-256 matched | Download | dec60264…d57f6c |
| 1.0.0-rc.7 | Cached · Upstream SHA-256 matched | Download | 6b85ca1c…b14540 |
| 1.0.0-rc.8 | Cached · Upstream SHA-256 matched | Download | b5970922…3db33b |
| 1.0.0-rc.9 | Cached · Upstream SHA-256 matched | Download | ef4792e1…213551 |
| 1.0.0 | Cached · Upstream SHA-256 matched | Download | 53def554…859450 |
| 2.0.0-beta.0 | Cached · Upstream SHA-256 matched | Download | 56607b30…5badcb |
| 2.0.0-beta.1 | Cached · Upstream SHA-256 matched | Download | 47f78712…8fad91 |
| 2.0.0 | Cached · Upstream SHA-256 matched | Download | 517560d6…e7a3f5 |
| 2.1.0 | Cached · Upstream SHA-256 matched | Download | e8ce9ca4…ffa42c |
| 2.2.0 | Cached · Upstream SHA-256 matched | Download | 4ff85b2a…879cf5 |
Dependencies
dbus "\u003e=0.6.3 \u003c1.0.0"
flutter {
"sdk": "flutter"
}
gsettings "\u003e=0.2.0 \u003c1.0.0"
popover "\u003e=0.2.6+2 \u003c1.0.0"