yaru 0.1.7
yaru: ^0.1.7 copied to clipboard
Ubuntu Yaru Style - Distinct look and feel of the Ubuntu Desktop
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:yaru/yaru.dart' as yaru;
import 'package:yaru_example/view/home_page.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
var theme = yaru.lightTheme;
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Yaru Example',
theme: theme,
home: HomePage(
themeChanged: (themeName) => setState(() {
if (themeName == 'Yaru-light') {
theme = yaru.lightTheme;
} else if (themeName == 'Yaru-dark') {
theme = yaru.darkTheme;
}
})),
);
}
}