getTDarkTheme function

ThemeData getTDarkTheme()

Implementation

ThemeData getTDarkTheme() {
  final base = ThemeData(
    brightness: Brightness.dark,
    primarySwatch: AppColors.primary,
    colorScheme: ColorScheme.dark(
      primary: AppColors.primary,
      onPrimary: Colors.white,
      primaryContainer: AppColors.primary.shade700,
      onPrimaryContainer: AppColors.primary.shade200,
      secondary: AppColors.secondary,
      onSecondary: Colors.white,
      secondaryContainer: AppColors.secondary.shade700,
      onSecondaryContainer: AppColors.secondary.shade200,
      error: AppColors.danger,
      onError: Colors.white,
      errorContainer: AppColors.danger.shade700,
      onErrorContainer: AppColors.danger.shade200,
      surface: AppColors.grey[950]!,
      surfaceDim: AppColors.grey.shade900,
      surfaceContainerLowest: AppColors.grey.shade700,
      surfaceContainerLow: AppColors.grey.shade800,
      surfaceContainer: AppColors.grey.shade800.withAlpha(200),
      surfaceContainerHigh: AppColors.grey.shade900.withAlpha(150),
      onSurface: AppColors.grey.shade300,
      onSurfaceVariant: AppColors.grey.shade400,
      outline: AppColors.grey.shade800,
      outlineVariant: AppColors.grey.shade900,
      shadow: AppColors.grey.shade900.withAlpha(125),
      scrim: AppColors.grey.shade900.withAlpha(150),
    ),
  );

  return base.copyWith(
    textTheme: base.textTheme.apply(fontFamily: 'Lexend', package: 'te_widgets'),
    extensions: [TWidgetThemeExtension().copyWith(layoutFrame: AppColors.grey.shade900)],
  );
}