Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #94 from RohanSengupta326/darkMode
Browse files Browse the repository at this point in the history
changed depricated methods in dark theme. Closes issue #86
  • Loading branch information
viveeeeeek committed Oct 23, 2021
2 parents cfb0e83 + 29685ec commit 2056fcb
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions lib/themes/dark_theme.dart
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';


class DarkTheme{

static ThemeData theme(BuildContext context, bool isDarkTheme){
class DarkTheme {
static ThemeData theme(BuildContext context, bool isDarkTheme) {
return ThemeData(
textTheme: GoogleFonts.montserratTextTheme(
Theme.of(context).textTheme,
),
primarySwatch: Colors.red,
primaryColor: isDarkTheme ? Colors.black : Colors.white,
scaffoldBackgroundColor: isDarkTheme ? Colors.black : Colors.white,

backgroundColor: isDarkTheme ? Colors.black : Color(0xffF1F5FB),

indicatorColor: isDarkTheme ? Color(0xff0E1D36) : Color(0xffCBDCF8),
buttonColor: isDarkTheme ? Color(0xff3B3B3B) : Color(0xffF1F5FB),

hintColor: isDarkTheme ? Color(0xff280C0B) : Color(0xffEECED3),

highlightColor: isDarkTheme ? Color(0xff372901) : Color(0xffFCE192),
hoverColor: isDarkTheme ? Color(0xff3A3A3B) : Color(0xff4285F4),

focusColor: isDarkTheme ? Color(0xff0B2512) : Color(0xffA8DAB5),
disabledColor: Colors.grey,
textSelectionColor: isDarkTheme ? Colors.white : Colors.black,
textSelectionTheme: TextSelectionThemeData(
selectionColor: isDarkTheme ? Colors.white : Colors.black,
),
cardColor: isDarkTheme ? Color(0xFF151515) : Colors.white,
canvasColor: isDarkTheme ? Colors.black : Colors.grey[50],
brightness: isDarkTheme ? Brightness.dark : Brightness.light,
Expand All @@ -36,4 +30,4 @@ class DarkTheme{
),
);
}
}
}

0 comments on commit 2056fcb

Please sign in to comment.