Files
lunasea/lib/core/theme.dart
Jagandeep Brar 7298f742cf [Release] v2.2.0 (220003) (#208)
* [Settings] Added toggle for Sonarr v3
* [UI] Removed letter spacing, use system default
* [Android] Enable billing permission
* [iOS] Enabled StoreKit API
* [Issues] Updated templates
* [Issues] Disable blank issues
* [Settings] System/Resources tile for Feedback
* [-rr/Add] Autofocus search bar
* [NZBGet] Option to use basic auth instead of URL-encoded auth
* [SABnzbd/Statistics] Show statistics for individual servers
* [Profiles] Added rapid-switching in specific module app bars
* [Settings] Added subheaders to explain some things
* [Pubspec] Updated version
* [TestFlight] 2.2.0 (220001)
* [Git] Ignore appbundle files
* [General] Added Donations IAPs, Added Licenses, Close Database Cleanly on Exit (#207)
* [Packages] Added in_app_purchase package
* [BIOS] Close Database on Clean Exit
* [Settings] Added Donations & Licenses Pages
* [Packages] Added flare/rive package
* [README] Removed spacing between shields
* [Donations/Licenses] Added Donations & Licenses Pages
* [Donations] Show localized price
* [Settings] Tweaked subtitles a little
* [IAPs] Fixed initialization on Android
2020-05-03 20:55:57 -05:00

95 lines
3.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:lunasea/core.dart';
class Themes {
Themes._();
static ThemeData getDarkTheme() => LunaSeaDatabaseValue.THEME_AMOLED.data
? _pureBlackTheme()
: _midnightTheme();
static ThemeData _midnightTheme() {
const _textStyle = TextStyle(
color: Colors.white,
);
return ThemeData(
brightness: Brightness.dark,
canvasColor: LSColors.primary,
primaryColor: LSColors.secondary,
accentColor: LSColors.accent,
highlightColor: LSColors.secondary,
cardColor: LSColors.secondary,
splashColor: LSColors.splash,
dialogBackgroundColor: LSColors.secondary,
dividerColor: LSColors.accent.withAlpha(0),
dividerTheme: DividerThemeData(
color: LSColors.accent,
indent: 100.0,
endIndent: 100.0,
),
iconTheme: IconThemeData(
color: Colors.white,
),
unselectedWidgetColor: Colors.white,
textTheme: TextTheme(
bodyText1: _textStyle,
bodyText2: _textStyle,
headline1: _textStyle,
headline2: _textStyle,
headline3: _textStyle,
headline4: _textStyle,
headline5: _textStyle,
headline6: _textStyle,
button: _textStyle,
caption: _textStyle,
subtitle1: _textStyle,
subtitle2: _textStyle,
overline: _textStyle,
),
visualDensity: VisualDensity.adaptivePlatformDensity,
);
}
static ThemeData _pureBlackTheme() {
const _textStyle = TextStyle(
color: Colors.white,
);
return ThemeData(
brightness: Brightness.dark,
canvasColor: Colors.black,
primaryColor: Colors.black,
accentColor: LSColors.accent,
highlightColor: LSColors.secondary,
cardColor: Colors.black,
splashColor: LSColors.splash,
dialogBackgroundColor: Colors.black,
dividerColor: LSColors.accent.withAlpha(0),
dividerTheme: DividerThemeData(
color: LSColors.accent,
indent: 72.0,
endIndent: 72.0,
),
iconTheme: IconThemeData(
color: Colors.white,
),
unselectedWidgetColor: Colors.white,
textTheme: TextTheme(
bodyText1: _textStyle,
bodyText2: _textStyle,
headline1: _textStyle,
headline2: _textStyle,
headline3: _textStyle,
headline4: _textStyle,
headline5: _textStyle,
headline6: _textStyle,
button: _textStyle,
caption: _textStyle,
subtitle1: _textStyle,
subtitle2: _textStyle,
overline: _textStyle,
),
visualDensity: VisualDensity.adaptivePlatformDensity,
);
}
}