Open Ridhubharan opened 2 years ago
Check out this! https://pub.dev/packages/bitsdojo_window#for-linux-apps
Step by step:
flutter pub get libadwaita_bitsdojo
to install the packagemy_application.cc
file, add
#include <bitsdojo_window_linux/bitsdojo_window_plugin.h>
to the top of the file, comment out the line
gtk_window_set_default_size(window, 1280, 720);
and add
auto bdw = bitsdojo_window_from(window);
bdw->setCustomFrame(true);
directly above it
main.dart
file (your root MaterialApp
widget) use AdwScaffold()
as your scaffold, example below return AdwScaffold(
start: const [AdwHeaderButton(icon: Icon(Icons.abc))],
actions: AdwActions().bitsdojo,
body: const Center(
child: Text('Welcome to Bitsdojo Window Example!'),
),
);
You should now get something like this:
I'll have to make a PR to update the example as I found it was very outdated too!
Instructions are not clear. Where am I supposed to put the following(as per https://github.com/gtk-flutter/libadwaita_plugins/tree/main/libadwaita_bitsdojo#usage)?
The 'headerbar' used in the 'AdwScaffold' widget is deprecated. (https://github.com/gtk-flutter/libadwaita_plugins/blob/main/libadwaita_bitsdojo/example/example.md)