libadwaita_core 0.5.4 copy "libadwaita_core: ^0.5.4" to clipboard
libadwaita_core: ^0.5.4 copied to clipboard

A libadwaita package for providing AdwControls and AdwActions for AdwHeaderBar

example/example.md

Minimal usage #

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

import 'package:adwaita/adwaita.dart';
import 'package:flutter/material.dart';
import 'package:libadwaita/libadwaita.dart';
import 'package:libadwaita_core/libadwaita_core.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(
        actions: AdwActions(
            onClose: () => print("Close it!"),
        ),
        controls: AdwControls(
            closeBtn: (onClose) => AdwButton.circular(
                onPressed: onClose,
                child: Icon(Icons.close),
            )
        ),
        start: const [
          AdwHeaderButton(
            icon: Icon(Icons.nightlight_round, size: 15),
          ),
        ],
        title: const Text('Core'),
      ),
      body: const Center(
        child: Text('Welcome to Core Example!'),
      ),
    );
  }
}
2
likes
150
pub points
41%
popularity

Publisher

unverified uploader

A libadwaita package for providing AdwControls and AdwActions for AdwHeaderBar

Repository (GitHub)
View/report issues

Documentation

API reference

License

MPL-2.0 (license)

Dependencies

flutter

More

Packages that depend on libadwaita_core