2019-03-11 20:38:05 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:vikunja_app/theme/constants.dart';
|
|
|
|
|
2020-06-17 17:41:40 +00:00
|
|
|
ThemeData buildVikunjaTheme() => _buildVikunjaTheme(ThemeData.light());
|
2021-12-21 11:22:17 +00:00
|
|
|
ThemeData buildVikunjaDarkTheme() => _buildVikunjaTheme(ThemeData.dark());
|
2020-06-17 17:41:40 +00:00
|
|
|
|
|
|
|
ThemeData _buildVikunjaTheme(ThemeData base) {
|
2019-03-11 20:38:05 +00:00
|
|
|
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(
|
2021-10-11 20:09:25 +00:00
|
|
|
// headline: base.textTheme.headline.copyWith(
|
|
|
|
// fontFamily: 'Quicksand',
|
|
|
|
// ),
|
|
|
|
// title: base.textTheme.title.copyWith(
|
|
|
|
// fontFamily: 'Quicksand',
|
|
|
|
// ),
|
2019-03-11 20:38:05 +00:00
|
|
|
button: base.textTheme.button.copyWith(
|
|
|
|
color:
|
|
|
|
vWhite, // This does not work, looks like a bug in Flutter: https://github.com/flutter/flutter/issues/19623
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|