mirror of
https://github.com/go-vikunja/app
synced 2024-12-14 04:41:52 +00:00
JonasFranz
826acc26f8
Merge branch 'master' into feature/dark-mode Add white logo in dark mode Make button shadow dark Format Add dark mode Co-authored-by: kolaente <k@knt.li> Co-authored-by: Jonas Franz <info@jonasfranz.software> Reviewed-on: vikunja/app#46 Reviewed-by: konrad <konrad@kola-entertainments.de>
43 lines
1.2 KiB
Dart
43 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:vikunja_app/theme/constants.dart';
|
|
|
|
ThemeData buildVikunjaTheme() => _buildVikunjaTheme(ThemeData.light());
|
|
|
|
ThemeData buildVikunjaDarkTheme() {
|
|
ThemeData base = _buildVikunjaTheme(ThemeData.dark());
|
|
return base.copyWith(
|
|
accentColor: vWhite,
|
|
);
|
|
}
|
|
|
|
ThemeData _buildVikunjaTheme(ThemeData base) {
|
|
return base.copyWith(
|
|
errorColor: vRed,
|
|
primaryColor: vPrimaryDark,
|
|
primaryColorLight: vPrimary,
|
|
primaryColorDark: vBlueDark,
|
|
buttonTheme: base.buttonTheme.copyWith(
|
|
buttonColor: vPrimary,
|
|
textTheme: ButtonTextTheme.normal,
|
|
colorScheme: base.buttonTheme.colorScheme.copyWith(
|
|
// Why does this not work?
|
|
onSurface: vWhite,
|
|
onSecondary: vWhite,
|
|
background: vBlue,
|
|
),
|
|
),
|
|
textTheme: base.textTheme.copyWith(
|
|
headline: base.textTheme.headline.copyWith(
|
|
fontFamily: 'Quicksand',
|
|
),
|
|
title: base.textTheme.title.copyWith(
|
|
fontFamily: 'Quicksand',
|
|
),
|
|
button: base.textTheme.button.copyWith(
|
|
color:
|
|
vWhite, // This does not work, looks like a bug in Flutter: https://github.com/flutter/flutter/issues/19623
|
|
),
|
|
),
|
|
);
|
|
}
|