darkTheme property
-------------------------- Dark Theme -------------------------------------------- ///
Implementation
static ThemeData darkTheme = ThemeData.dark().copyWith(
/// Brightness
brightness: Brightness.dark,
/// Primary Color
primaryColor: const Color(0xff3d63ff),
/// Scaffold and Background color
scaffoldBackgroundColor: const Color(0xff1b1b1b),
backgroundColor: const Color(0xff252525),
canvasColor: Colors.transparent,
/// AppBar Theme
appBarTheme: const AppBarTheme(
actionsIconTheme: IconThemeData(
color: Color(0xffffffff),
),
color: Color(0xff2e343b),
iconTheme: IconThemeData(color: Color(0xffffffff), size: 24),
),
///ButtonTheme
buttonTheme: ButtonThemeData(
textTheme: ButtonTextTheme.normal,
buttonColor: const Color(0xFF3E3E41),
colorScheme: const ColorScheme.dark(
primary: Color(0xff3d63ff),
onPrimary: Colors.white,
secondary: Color(0xff495057),
onSecondary: Colors.white,
surface: Color(0xFF14161A),
background: Color(0xFF2E2C2C),
onBackground: Color(0xff495057),
).copyWith(secondary: const Color(0xff3d63ff)),
),
/// Card Theme
cardTheme: const CardTheme(
color: Color(0xff37404a),
shadowColor: Color(0xff000000),
elevation: 1,
margin: EdgeInsets.all(0),
),
iconTheme: const IconThemeData(
color: Color(0xff3d63ff),
),
/// Other Colors
indicatorColor: Colors.white,
disabledColor: const Color(0xffa3a3a3),
highlightColor: Colors.white,
/// Input (Text-Field) Theme
inputDecorationTheme: const InputDecorationTheme(
fillColor: Color(0xff3E444A),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(4)),
borderSide: BorderSide(width: 1, color: Color(0xff3d63ff)),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(4)),
borderSide: BorderSide(width: 1, color: Colors.white70),
),
border: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(4)),
borderSide: BorderSide(width: 1, color: Colors.white70)),
),
/// Divider Theme
dividerTheme:
const DividerThemeData(color: Color(0xff363636), thickness: 1),
dividerColor: const Color(0xff363636),
errorColor: Colors.orange,
cardColor: const Color(0xff282a2b),
splashColor: Colors.white.withAlpha(100),
/// Floating Action Theme
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: const Color(0xff3d63ff),
splashColor: Colors.white.withAlpha(100),
highlightElevation: 8,
elevation: 4,
focusColor: const Color(0xff3d63ff),
hoverColor: const Color(0xff3d63ff),
foregroundColor: Colors.white),
popupMenuTheme: const PopupMenuThemeData(
color: Color(0xff37404a),
),
/// Bottom AppBar Theme
bottomAppBarTheme:
const BottomAppBarTheme(color: Color(0xff464c52), elevation: 2),
/// Tab bar Theme
tabBarTheme: const TabBarTheme(
unselectedLabelColor: Color(0xff495057),
labelColor: Color(0xff3d63ff),
indicatorSize: TabBarIndicatorSize.label,
indicator: UnderlineTabIndicator(
borderSide: BorderSide(color: Color(0xff3d63ff), width: 2.0),
),
),
/// Slider Theme
sliderTheme: SliderThemeData(
activeTrackColor: const Color(0xff3d63ff),
inactiveTrackColor: const Color(0xff3d63ff).withAlpha(100),
trackShape: const RoundedRectSliderTrackShape(),
trackHeight: 4.0,
thumbColor: const Color(0xff3d63ff),
thumbShape: const RoundSliderThumbShape(enabledThumbRadius: 10.0),
overlayShape: const RoundSliderOverlayShape(overlayRadius: 24.0),
tickMarkShape: const RoundSliderTickMarkShape(),
inactiveTickMarkColor: Colors.red[100],
valueIndicatorShape: const PaddleSliderValueIndicatorShape(),
valueIndicatorTextStyle: const TextStyle(
color: Colors.white,
),
),
cupertinoOverrideTheme: const CupertinoThemeData(),
/// Color scheme
colorScheme: const ColorScheme.dark(
primary: Color(0xff3d63ff),
secondary: Color(0xff00cc77),
// secondaryVariant: Color(0xff00cc77),
background: Color(0xff252525),
onPrimary: Colors.white,
onBackground: Colors.white,
onSecondary: Colors.white,
surface: Color(0xff585e63),
).copyWith(secondary: const Color(0xff3d63ff)));