themeData static method

ThemeData themeData(
  1. bool isDarkTheme,
  2. BuildContext context
)

Implementation

static ThemeData themeData(bool isDarkTheme, BuildContext context) {
  return ThemeData(
    fontFamily: 'IRANYekanFN',
    primaryColor: isDarkTheme ? Colors.black : ClassColors.mtPrimary_5,
    hintColor: isDarkTheme ? Colify.gray : Colify.gray,
    cardTheme: CardTheme(
        color: isDarkTheme ? const Color(0xFF151515) : Colors.white,
        elevation: 0.2,
        shape:
            RoundedRectangleBorder(borderRadius: BorderRadius.circular(5))),
    elevatedButtonTheme: ElevatedButtonThemeData(style: elevatedButtonStyle),
    outlinedButtonTheme: OutlinedButtonThemeData(style: outlineButtonStyle),
    scaffoldBackgroundColor:
        isDarkTheme ? Colors.black : const Color(0xffF1F5FB),
    indicatorColor:
        isDarkTheme ? const Color(0xff0E1D36) : const Color(0xffCBDCF8),
    // buttonColor: isDarkTheme ? Color(0xff3B3B3B) : Color(0xffF1F5FB),
    // hintColor: isDarkTheme ?  Conf.grayColor : Conf.grayColor,
    /*highlightColor: isDarkTheme ? Color(0xff372901) : Color(0xffFCE192),*/
    hoverColor:
        isDarkTheme ? const Color(0xff3A3A3B) : const Color(0xff4285F4),
    focusColor:
        isDarkTheme ? const Color(0xff0B2512) : const Color(0xffA8DAB5),
    disabledColor: Colors.grey,
    textSelectionTheme: TextSelectionThemeData(
        selectionColor:
            isDarkTheme ? ClassColors.mtPrimary_2 : ClassColors.mtPrimary_2),
    cardColor: isDarkTheme ? const Color(0xFF303030) : Colors.white,
    canvasColor: isDarkTheme ? Colors.black : Colors.grey[50],
    brightness: isDarkTheme ? Brightness.dark : Brightness.light,
    buttonTheme: Theme.of(context).buttonTheme.copyWith(
          colorScheme: isDarkTheme
              ? const ColorScheme.dark()
              : const ColorScheme.light(),
        ),
    appBarTheme: AppBarTheme(
        backgroundColor: isDarkTheme ? Color(0xFF555555) : Colors.white),
    colorScheme: ColorScheme.fromSwatch(primarySwatch: mcgpalette0).copyWith(
        brightness: isDarkTheme ? Brightness.dark : Brightness.light,
        background: isDarkTheme ? Colors.black : const Color(0xffF1F5FB)),
  );
}