theme changes
parent
d1336eec8b
commit
283473a06a
@ -0,0 +1,15 @@
|
||||
import 'package:diplomaticquarterapp/theme/theme_value.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ThemeNotifier with ChangeNotifier {
|
||||
ThemeData _themeData = defaultTheme;
|
||||
|
||||
ThemeNotifier(this._themeData);
|
||||
|
||||
getTheme() => _themeData;
|
||||
|
||||
setTheme(ThemeData themeData) async {
|
||||
_themeData = themeData;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
import 'dart:ui';
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
/// ---- Default Theme ----
|
||||
///
|
||||
|
||||
//final projectProvider = Provider.of(AppGlobal.context);
|
||||
final bluePrimary = Color(0xFF3F51B5);
|
||||
final blueAccent = Color(0xFFFF9800);
|
||||
final blueBackground = Color(0xFFFFFFFF);
|
||||
final defaultTheme = ThemeData(
|
||||
// fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans',
|
||||
primarySwatch: Colors.blue,
|
||||
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(0xffEEEEEE),
|
||||
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
|
||||
textSelectionHandleColor: Colors.grey,
|
||||
canvasColor: Colors.white,
|
||||
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
|
||||
highlightColor: Colors.grey[100].withOpacity(0.4),
|
||||
splashColor: Colors.transparent,
|
||||
primaryColor: Color(0xff40ACC9),
|
||||
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)),
|
||||
cursorColor: Colors.grey,
|
||||
iconTheme: IconThemeData(),
|
||||
appBarTheme: AppBarTheme(
|
||||
color: Color(0xff40ACC9),
|
||||
brightness: Brightness.dark,
|
||||
elevation: 10.0,
|
||||
actionsIconTheme: IconThemeData(
|
||||
color: Color(0xff40ACC9),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final invertTheme = ThemeData(
|
||||
// fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans',
|
||||
primarySwatch: Colors.black,
|
||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||
brightness: Brightness.dark,
|
||||
pageTransitionsTheme: const PageTransitionsTheme(
|
||||
builders: {
|
||||
TargetPlatform.android: ZoomPageTransitionsBuilder(),
|
||||
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
|
||||
},
|
||||
),
|
||||
hintColor: Colors.white,
|
||||
disabledColor: Colors.white,
|
||||
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
|
||||
scaffoldBackgroundColor: Color(0xffEEEEEE),
|
||||
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
|
||||
textSelectionHandleColor: Colors.white,
|
||||
canvasColor: Colors.white,
|
||||
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
|
||||
highlightColor: Colors.grey[100].withOpacity(0.4),
|
||||
splashColor: Colors.transparent,
|
||||
primaryColor: Color(0xff40ACC9),
|
||||
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)),
|
||||
cursorColor: Colors.grey,
|
||||
iconTheme: IconThemeData(),
|
||||
appBarTheme: AppBarTheme(
|
||||
color: Color(0xff000000),
|
||||
brightness: Brightness.dark,
|
||||
elevation: 5.0,
|
||||
actionsIconTheme: IconThemeData(
|
||||
color: Color(0xff000000),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final dimTheme = ThemeData(
|
||||
// fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans',
|
||||
primarySwatch: Colors.blue,
|
||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||
brightness: Brightness.dark,
|
||||
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),
|
||||
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
|
||||
textSelectionHandleColor: Colors.grey,
|
||||
canvasColor: Colors.white,
|
||||
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
|
||||
highlightColor: Colors.grey[100].withOpacity(0.4),
|
||||
splashColor: Colors.transparent,
|
||||
primaryColor: Color(0xff40ACC9),
|
||||
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)),
|
||||
cursorColor: Colors.grey,
|
||||
iconTheme: IconThemeData(),
|
||||
appBarTheme: AppBarTheme(
|
||||
color: Color(0xff40ACC9),
|
||||
brightness: Brightness.dark,
|
||||
elevation: 10.0,
|
||||
actionsIconTheme: IconThemeData(
|
||||
color: Color(0xff40ACC9),
|
||||
),
|
||||
),
|
||||
);
|
Loading…
Reference in New Issue