You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PatientApp-KKUMC/lib/theme/theme_value.dart

195 lines
7.2 KiB
Dart

import 'package:diplomaticquarterapp/Constants.dart';
5 years ago
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
5 years ago
/// ---- Default Theme ----
///
//final projectProvider = Provider.of(AppGlobal.context);
final bluePrimary = Color(0xFF00000);
5 years ago
final blueAccent = Color(0xFFFF9800);
final blueBackground = Color(0xFFFFFFFF);
const MaterialColor appColor = MaterialColor(
0xFF045531,
<int, Color>{
50: Color(0xFFFFEBEE),
100: Color(0xFF2E6049),
200: Color(0xFF185339),
300: Color(0xFF125939),
400: Color(0xE6085734),
500: Color(0xFF045531),
600: Color(0xFF024024),
700: Color(0xFF034226),
800: Color(0xFF022C1A),
900: Color(0xFF011C10),
},
);
defaultTheme({fontName}) {
return ThemeData(
fontFamily: fontName,
2 years ago
useMaterial3: false,
//projectProvider.isArabic ? 'Cairo' : 'WorkSans',
primarySwatch: appColor,
5 years ago
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light,
pageTransitionsTheme: const PageTransitionsTheme(
builders: {
TargetPlatform.android: ZoomPageTransitionsBuilder(),
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
},
),
hintColor: Colors.grey[400],
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Color(0xffF8F8F8),
5 years ago
canvasColor: Colors.white,
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100]!.withOpacity(0.4),
5 years ago
splashColor: Colors.transparent,
5 years ago
primaryColor: Color(0xff515A5D),
toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor,
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)),
primaryTextTheme: TextTheme(bodyText2: TextStyle(color: Colors.white)),
iconTheme: IconThemeData(),
textTheme: TextTheme(
bodyText1: TextStyle(color: Colors.black, letterSpacing: 0.6),
headline1: TextStyle(color: Colors.white, letterSpacing: 0.6),
headline2: TextStyle(color: Colors.white, letterSpacing: 0.6),
),
floatingActionButtonTheme: FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2),
5 years ago
appBarTheme: AppBarTheme(
color: Color(0xff515A5D),
elevation: 0.0,
actionsIconTheme: IconThemeData(
color: Colors.grey[800],
), systemOverlayStyle: SystemUiOverlayStyle.dark,
), textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.grey, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey,),
);
}
invertThemes({fontName}) {
return ThemeData(
fontFamily: fontName,
//projectProvider.isArabic ? 'Cairo' : 'WorkSans',
primarySwatch: appColor,
2 years ago
useMaterial3: false,
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.dark,
pageTransitionsTheme: const PageTransitionsTheme(
builders: {
TargetPlatform.android: ZoomPageTransitionsBuilder(),
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
},
),
hintColor: Colors.grey[400],
textTheme: TextTheme(bodyText1: TextStyle(color: Colors.white), headline1: TextStyle(color: Colors.white), headline2: TextStyle(color: Colors.white)),
disabledColor: Colors.grey[800],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Color(0xff000000),
canvasColor: Colors.black,
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100]!.withOpacity(0.4),
splashColor: Colors.transparent,
primaryColor: Color(0xff515A5D),
toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor,
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)),
5 years ago
iconTheme: IconThemeData(),
appBarTheme: AppBarTheme(
color: Color(0xff000000),
elevation: 0.0,
5 years ago
actionsIconTheme: IconThemeData(
color: Colors.grey[800],
), systemOverlayStyle: SystemUiOverlayStyle.light,
), textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.black, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey,),
5 years ago
);
}
5 years ago
bwThemes({fontName}) {
return ThemeData(
fontFamily: fontName,
//projectProvider.isArabic ? 'Cairo' : 'WorkSans',
primarySwatch: appColor,
2 years ago
useMaterial3: false,
5 years ago
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.dark,
unselectedWidgetColor: Colors.red,
5 years ago
pageTransitionsTheme: const PageTransitionsTheme(
builders: {
TargetPlatform.android: ZoomPageTransitionsBuilder(),
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
},
),
hintColor: Colors.grey[400],
textTheme: TextTheme(
bodyText1: TextStyle(color: appColor[900]),
headline1: TextStyle(color: appColor[900]),
5 years ago
headline2: TextStyle(color: Colors.white),
bodyText2: TextStyle(color: appColor[900]),
subtitle1: TextStyle(color: appColor[900]),
),
tabBarTheme: TabBarTheme(labelColor: appColor[900]),
disabledColor: Colors.grey[800],
5 years ago
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Color(0xffffffe4),
canvasColor: Colors.black,
backgroundColor: Color(0xffffffe4),
highlightColor: Colors.grey[100]!.withOpacity(0.4),
5 years ago
splashColor: Colors.transparent,
primaryColor: Color(0xfffffff4),
toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor,
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)),
5 years ago
iconTheme: IconThemeData(),
appBarTheme: AppBarTheme(
color: Color(0xffffffe4),
elevation: 0.0,
5 years ago
actionsIconTheme: IconThemeData(
color: Colors.grey[800],
), systemOverlayStyle: SystemUiOverlayStyle.light,
), textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.black, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey,),
5 years ago
);
}
5 years ago
dimTheme({fontName}) {
return ThemeData(
fontFamily: fontName,
//projectProvider.isArabic ? 'Cairo' : 'WorkSans',
primarySwatch: appColor,
5 years ago
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.dark,
2 years ago
useMaterial3: false,
5 years ago
pageTransitionsTheme: const PageTransitionsTheme(
builders: {
TargetPlatform.android: ZoomPageTransitionsBuilder(),
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
},
),
hintColor: Colors.grey[400],
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Color(0xffEEEEEE),
5 years ago
canvasColor: Colors.white,
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100]!.withOpacity(0.4),
5 years ago
splashColor: Colors.transparent,
primaryColor: Color(0xff40ACC9),
5 years ago
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)),
iconTheme: IconThemeData(),
appBarTheme: AppBarTheme(
color: Color(0xff40ACC9),
5 years ago
elevation: 10.0,
actionsIconTheme: IconThemeData(
color: Color(0xff40ACC9),
), systemOverlayStyle: SystemUiOverlayStyle.light,
), textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.grey, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey,),
5 years ago
);
}