Dark theme
This commit is contained in:
parent
adcd5f9b92
commit
71c43b08b5
|
|
@ -1,15 +1,20 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:quickgui/src/pages/main_page.dart';
|
||||
|
||||
class App extends StatelessWidget {
|
||||
class App extends StatefulWidget {
|
||||
const App({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<App> createState() => _AppState();
|
||||
}
|
||||
|
||||
class _AppState extends State<App> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(
|
||||
primarySwatch: Colors.pink,
|
||||
),
|
||||
home: const MainPage(title: 'Quickgui - A Flutter frontend for Quickget and Quickemu'));
|
||||
theme: ThemeData(primarySwatch: Colors.pink),
|
||||
darkTheme: ThemeData.dark(),
|
||||
home: const MainPage(title: 'Quickgui - A Flutter frontend for Quickget and Quickemu'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ class CancelDismissButton extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Theme.of(context).colorScheme.surface,
|
||||
),
|
||||
onPressed: !downloadFinished
|
||||
? onCancel
|
||||
: () {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class _DownloaderMenuState extends State<DownloaderMenu> with PreferencesMixin {
|
|||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: Container(
|
||||
color: Colors.pink,
|
||||
color: Theme.of(context).brightness == Brightness.dark ? Theme.of(context).colorScheme.surface : Theme.of(context).colorScheme.primary,
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ class HomePageButton extends StatelessWidget {
|
|||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Colors.white,
|
||||
onPrimary: Colors.pink,
|
||||
primary: Theme.of(context).canvasColor, //Theme.of(context).canvasColor
|
||||
onPrimary: Theme.of(context).brightness == Brightness.dark ? Colors.white70 : Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
onPressed: onPressed,
|
||||
child: Padding(
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class MainMenu extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: Container(
|
||||
color: Colors.pink,
|
||||
color: Theme.of(context).brightness == Brightness.dark ? Theme.of(context).colorScheme.surface : Theme.of(context).colorScheme.primary,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
|
|
|
|||
Loading…
Reference in New Issue