import 'package:flutter/material.dart'; class LightThemeConfig { static const Color _primary = Color(0XFF007EA7); static const Color _white = Color(0XFFFFFFFF); static const Color _black = Color(0XFF292929); static const Color _background = Color(0XFFF8F8FA); static final ThemeData themeData = ThemeData( backgroundColor: _background, scaffoldBackgroundColor: _background, colorScheme: _colorScheme, fontFamily: 'Dana-FA', textTheme: _textTheme, cardColor: _colorScheme.surface, ); static final TextTheme _textTheme = const TextTheme( bodyText1: _body1Text, bodyText2: _body2Text, caption: _captionText, subtitle2: _subtitle2Text, subtitle1: _subtitle1Text, headline3: _headline3Text, overline: _overlineText, ).apply(bodyColor: _black, displayColor: _black); static const ColorScheme _colorScheme = ColorScheme( primary: _primary, primaryVariant: _white, secondary: Color(0XFFD61515), secondaryVariant: _white, surface: _white, background: _background, error: Color(0XFFF00505), onPrimary: _white, onSecondary: _white, onSurface: _black, onBackground: _white, onError: _white, brightness: Brightness.light, ); static const TextStyle _headline3Text = TextStyle( fontSize: 20, fontWeight: FontWeight.w600, ); static const TextStyle _subtitle1Text = TextStyle( fontSize: 17, fontWeight: FontWeight.w700, ); static const TextStyle _subtitle2Text = TextStyle( fontSize: 15, fontWeight: FontWeight.w700, ); static const TextStyle _body1Text = TextStyle( fontSize: 15, fontWeight: FontWeight.w700, ); static const TextStyle _body2Text = TextStyle( fontSize: 15, fontWeight: FontWeight.w400, ); static const TextStyle _captionText = TextStyle( fontSize: 13, fontWeight: FontWeight.w400, ); static const TextStyle _overlineText = TextStyle( fontSize: 12, fontWeight: FontWeight.w300, ); } class DarkThemeConfig { static const Color _primary = Color(0XFF007EA7); static const Color _white = Color(0XFFFFFFFF); static const Color _background = Color(0XFF202224); static final ThemeData themeData = ThemeData( backgroundColor: _background, scaffoldBackgroundColor: _background, colorScheme: _colorScheme, fontFamily: 'Dana-FA', textTheme: _textTheme, iconTheme: IconThemeData( color: _colorScheme.focusedBorder, ), cardColor: _colorScheme.surface, ); static final TextTheme _textTheme = const TextTheme( bodyText1: _body1Text, bodyText2: _body2Text, caption: _captionText, subtitle2: _subtitle2Text, subtitle1: _subtitle1Text, headline3: _headline3Text, overline: _overlineText, ).apply(bodyColor: text, displayColor: text); static const ColorScheme _colorScheme = ColorScheme( primary: _primary, primaryVariant: _white, secondary: Color(0XFFE53939), secondaryVariant: _white, surface: Color(0XFF181B1F), background: _background, error: Color(0XFFF53B3B), onPrimary: _white, onSecondary: _white, onSurface: text, onBackground: text, onError: _white, brightness: Brightness.dark, ); static const TextStyle _headline3Text = TextStyle( fontSize: 20, fontWeight: FontWeight.w600, ); static const TextStyle _subtitle1Text = TextStyle( fontSize: 17, fontWeight: FontWeight.w700, ); static const TextStyle _subtitle2Text = TextStyle( fontSize: 15, fontWeight: FontWeight.w700, ); static const TextStyle _body1Text = TextStyle( fontSize: 15, fontWeight: FontWeight.w700, ); static const TextStyle _body2Text = TextStyle( fontSize: 15, fontWeight: FontWeight.w400, ); static const TextStyle _captionText = TextStyle( fontSize: 13, fontWeight: FontWeight.w400, ); static const TextStyle _overlineText = TextStyle( fontSize: 12, fontWeight: FontWeight.w300, ); // Grey colors static const Color white = Color(0XFFFFFFFF); static const Color title = Color(0XFFF5F5F5); static const Color text = Color(0XFFD6D6D6); static const Color hint = Color(0XFFBBBBBB); static const Color border = Color(0XFF666666); // Error and success static const Color errorLight = Color(0XFFF0C9CD); static const Color error = Color(0XFFF53B3B); static const Color successLight = Color(0XFFBBD6B4); static const Color success = Color(0XFF32A64C); } extension DidvanColorScheme on ColorScheme { // Secondary colors Color get secondaryDisabled => brightness == Brightness.dark ? const Color(0XFF703838) : const Color(0XFFFFC8C8); Color get white => const Color(0XFFFFFFFF); Color get focused => brightness == Brightness.dark ? const Color(0XFF323C47) : const Color(0XFFE6F3FA); Color get navigation => brightness == Brightness.dark ? const Color(0XFF181B1F) : const Color(0XFF012348); Color get focusedBorder => brightness == Brightness.dark ? const Color(0XFFC8E0F4) : const Color(0XFF195D80); Color get title => brightness == Brightness.dark ? const Color(0XFFD6D6D6) : const Color(0XFF1B3C59); Color get text => brightness == Brightness.dark ? const Color(0XFFD6D6D6) : const Color(0XFF292929); Color get inputText => brightness == Brightness.dark ? const Color(0XFFA3A3A3) : const Color(0XFF3D3D3D); Color get caption => brightness == Brightness.dark ? const Color(0XFFBBBBBB) : const Color(0XFF666666); Color get hint => const Color(0XFFBBBBBB); Color get disabledText => brightness == Brightness.dark ? const Color(0XFF666666) : const Color(0XFFE0E0E0); Color get border => brightness == Brightness.dark ? const Color(0XFF666666) : const Color(0XFFE0E0E0); Color get cardBorder => brightness == Brightness.dark ? const Color(0XFF666666) : const Color(0XFFEBEBEB); Color get disabledBackground => brightness == Brightness.dark ? const Color(0XFF1F1F1F) : const Color(0XFFE0E0E0); Color get secondCTA => brightness == Brightness.dark ? const Color(0XFF474747) : const Color(0XFFF5F5F5); Color get splash => brightness == Brightness.dark ? const Color(0XFF333333) : const Color(0XFFC8E0F4); Color get black => brightness == Brightness.dark ? const Color(0XFF1F1F1F) : const Color(0XFF292929); // Error and success colors Color get errorLight => brightness == Brightness.dark ? const Color(0XFFF0C9CD) : const Color(0XFFFFF8F8); Color get successLight => brightness == Brightness.dark ? const Color(0XFFBBD6B4) : const Color(0XFFF5FFFC); Color get success => brightness == Brightness.dark ? const Color(0XFF32A64C) : const Color(0XFF2BB24A); }