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