libadwaita 1.0.0-rc.1 copy "libadwaita: ^1.0.0-rc.1" to clipboard
libadwaita: ^1.0.0-rc.1 copied to clipboard

outdated

Unofficial implementation of Libadwaita widgets and themes in Flutter.

example/lib/main.dart

import 'package:example/flap/flap_demo.dart';
import 'package:example/view_switcher/view_switcher_demo.dart';
import 'package:multi_window/multi_widget.dart';
import 'package:multi_window/multi_window.dart';

import 'home_page.dart';
import 'package:flutter/material.dart';
import 'package:adwaita/adwaita.dart' as adwaita;

void main(List<String> args) async {
  WidgetsFlutterBinding.ensureInitialized();

  MultiWindow.init(args);
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  final ValueNotifier<ThemeMode> themeNotifier =
      ValueNotifier(ThemeMode.system);

  MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ValueListenableBuilder<ThemeMode>(
      valueListenable: themeNotifier,
      builder: (_, ThemeMode currentMode, __) {
        return MaterialApp(
            theme: adwaita.lightTheme,
            darkTheme: adwaita.darkTheme,
            debugShowCheckedModeBanner: false,
            home: MultiWidget({
              'flap': FlapDemo(),
              'view_switcher': ViewSwitcherDemo(),
            }, fallback: MyHomePage(themeNotifier: themeNotifier)),
            themeMode: currentMode);
      },
    );
  }
}
79
likes
0
pub points
71%
popularity

Publisher

verified publisherprateeksu.blogspot.com

Unofficial implementation of Libadwaita widgets and themes in Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dbus, flutter, gsettings

More

Packages that depend on libadwaita