63 lines
2.3 KiB
Dart
63 lines
2.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
// --- OneDark Theme Colors, translated to Flutter ---
|
|
class AppTheme {
|
|
static const Color oneDarkBg = Color(0xFF282c34);
|
|
static const Color oneDarkSurface = Color(0xFF21252b);
|
|
static const Color oneDarkPrimary = Color(0xFF61afef);
|
|
static const Color oneDarkAccent = Color(0xFFc678dd);
|
|
static const Color oneDarkGreen = Color(0xFF98c379);
|
|
static const Color oneDarkRed = Color(0xFFe06c75);
|
|
static const Color oneDarkYellow = Color(0xFFe5c07b);
|
|
static const Color oneDarkText = Color(0xFFabb2bf);
|
|
static const Color oneDarkTextWeak = Color(0xFF5c6370);
|
|
|
|
static final ThemeData darkTheme = ThemeData.dark().copyWith(
|
|
primaryColor: oneDarkPrimary,
|
|
scaffoldBackgroundColor: oneDarkBg,
|
|
colorScheme: const ColorScheme.dark(
|
|
primary: oneDarkPrimary,
|
|
secondary: oneDarkAccent,
|
|
surface: oneDarkSurface,
|
|
onPrimary: Colors.black, // Text on primary color buttons
|
|
onSecondary: Colors.black,
|
|
onSurface: oneDarkText,
|
|
error: oneDarkRed,
|
|
onError: Colors.black,
|
|
),
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: oneDarkSurface,
|
|
foregroundColor: oneDarkText,
|
|
centerTitle: true,
|
|
elevation: 0,
|
|
),
|
|
inputDecorationTheme: const InputDecorationTheme(
|
|
labelStyle: TextStyle(color: oneDarkText),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderSide: BorderSide(color: oneDarkAccent),
|
|
borderRadius: BorderRadius.all(Radius.circular(8.0)),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderSide: BorderSide(color: oneDarkPrimary),
|
|
borderRadius: BorderRadius.all(Radius.circular(8.0)),
|
|
),
|
|
prefixIconColor: oneDarkTextWeak,
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ButtonStyle(
|
|
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
|
|
RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.0)),
|
|
),
|
|
),
|
|
),
|
|
progressIndicatorTheme: const ProgressIndicatorThemeData(
|
|
color: oneDarkPrimary,
|
|
linearTrackColor: oneDarkSurface,
|
|
),
|
|
dividerTheme: const DividerThemeData(color: oneDarkAccent, thickness: 1),
|
|
snackBarTheme: const SnackBarThemeData(
|
|
backgroundColor: oneDarkPrimary,
|
|
contentTextStyle: TextStyle(color: oneDarkTextWeak),
|
|
),
|
|
);
|
|
}
|