libadwaita_titlebar_buttons 0.5.1+1 copy "libadwaita_titlebar_buttons: ^0.5.1+1" to clipboard
libadwaita_titlebar_buttons: ^0.5.1+1 copied to clipboard

A libadwaita package for providing an extension to AdwControls for titlebar_buttons package

example/example.md

Minimal usage #

#pubspec.yaml
dependencies:
  adwaita:
  libadwaita:
  libadwaita_titlebar_buttons:
// main.dart

import 'package:adwaita/adwaita.dart';
import 'package:flutter/material.dart';
import 'package:libadwaita/libadwaita.dart';
import 'package:libadwaita_titlebar_buttons/libadwaita_titlebar_buttons.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: AdwaitaThemeData.light(),
      darkTheme: AdwaitaThemeData.dark(),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);
  
  @override
  Widget build(BuildContext context) {
    return AdwScaffold(
      headerbar: (_) => AdwHeaderBar(
        controls: AdwControls().titlebarButtons(),
        start: const [
          AdwHeaderButton(
            icon: Icon(Icons.nightlight_round, size: 15),
          ),
        ],
        title: const Text('Titlebar Buttons'),
      ),
      body: const Center(
        child: Text('Welcome to Titlebar Buttons Example!'),
      ),
    );
  }
}
1
likes
150
pub points
23%
popularity

Publisher

unverified uploader

A libadwaita package for providing an extension to AdwControls for titlebar_buttons package

Repository (GitHub)
View/report issues

Documentation

API reference

License

MPL-2.0 (license)

Dependencies

flutter, libadwaita_core, titlebar_buttons

More

Packages that depend on libadwaita_titlebar_buttons