mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 12:42:34 +00:00
NEW - [Settings/Modules] Add an information/help button with module descriptions and links TWEAKS - [Radarr] Always show the amount of days content will be available instead of limiting it to only content in the next 30 days - [Settings] Moved "Backup & Restore" and "Logs" to "System" section - [Settings] Merged "Customization" and "Modules" sections into "Configuration" - [Settings/Sonarr] Removed the need to enable Sonarr to test the connection - [Settings/Tautulli] Removed the need to enable Tautulli to test the connection FIXES - [IAPs] Ensure all IAPs are marked as "consumed" - [Flutter] Updated packages - [Logging] Updated Sentry to v4 framework to improve capturing fatal/crashing bugs - [Settings/Logs] Hide exception and stack trace buttons when an error is not available - [Sonarr/History] Fixed history fetching the oldest entries, not the newest - [State] Correctly clear state when clearing LunaSea's configuration - [Tautulli/Activity] Fixed consistency of hardware transcoding indicator compared to the web UI - [UI/Divider] Fix consistency of divider width across regular and AMOLED dark theme
82 lines
3.0 KiB
Dart
82 lines
3.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:lunasea/core.dart';
|
|
|
|
class LunaTheme {
|
|
/// Returns the active [ThemeData] by checking the theme database value.
|
|
static ThemeData activeTheme() {
|
|
return LunaDatabaseValue.THEME_AMOLED.data ? _pureBlackTheme() : _midnightTheme();
|
|
}
|
|
|
|
/// Midnight theme (Default)
|
|
static ThemeData _midnightTheme() {
|
|
const _textStyle = TextStyle(color: Colors.white);
|
|
return ThemeData(
|
|
brightness: Brightness.dark,
|
|
canvasColor: LunaColours.primary,
|
|
primaryColor: LunaColours.secondary,
|
|
accentColor: LunaColours.accent,
|
|
highlightColor: LunaColours.secondary,
|
|
cardColor: LunaColours.secondary,
|
|
splashColor: LunaColours.splash,
|
|
dialogBackgroundColor: LunaColours.secondary,
|
|
toggleableActiveColor: LunaColours.accent,
|
|
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,
|
|
);
|
|
}
|
|
|
|
/// AMOLED/Pure black theme
|
|
static ThemeData _pureBlackTheme() {
|
|
const _textStyle = TextStyle(color: Colors.white);
|
|
return ThemeData(
|
|
brightness: Brightness.dark,
|
|
canvasColor: Colors.black,
|
|
primaryColor: Colors.black,
|
|
accentColor: LunaColours.accent,
|
|
highlightColor: LunaColours.secondary,
|
|
cardColor: Colors.black,
|
|
splashColor: LunaColours.splash,
|
|
dialogBackgroundColor: Colors.black,
|
|
toggleableActiveColor: LunaColours.accent,
|
|
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,
|
|
);
|
|
}
|
|
} |