42 lines
898 B
Dart
42 lines
898 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:yaru/yaru.dart';
|
|
|
|
Future<void> main() async {
|
|
await YaruWindowTitleBar.ensureInitialized();
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return YaruTheme(builder: (context, yaru, child) {
|
|
return MaterialApp(
|
|
debugShowCheckedModeBanner: false,
|
|
theme: yaru.theme,
|
|
darkTheme: yaru.darkTheme,
|
|
home: _Home(),
|
|
);
|
|
});
|
|
}
|
|
}
|
|
|
|
class _Home extends StatelessWidget {
|
|
const _Home({
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: YaruWindowTitleBar(),
|
|
body: Center(
|
|
child: Text('Hello Ubuntu',
|
|
style: TextStyle(
|
|
color: Theme.of(context).primaryColor,
|
|
)),
|
|
));
|
|
}
|
|
}
|