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.
		
		
		
		
		
			
		
			
				
	
	
		
			59 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Dart
		
	
			
		
		
	
	
			59 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Dart
		
	
import 'package:flutter/material.dart';
 | 
						|
import 'package:flutter/services.dart';
 | 
						|
 | 
						|
class AppTheme {
 | 
						|
  static ThemeData getTheme(isArabic) => ThemeData(
 | 
						|
        fontFamily: isArabic ? 'GESSTwo' : 'Poppins',
 | 
						|
        primarySwatch: Colors.red,
 | 
						|
        visualDensity: VisualDensity.adaptivePlatformDensity,
 | 
						|
        brightness: Brightness.light,
 | 
						|
        pageTransitionsTheme: const PageTransitionsTheme(
 | 
						|
          builders: {
 | 
						|
            TargetPlatform.android: ZoomPageTransitionsBuilder(),
 | 
						|
            TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
 | 
						|
          },
 | 
						|
        ),
 | 
						|
        hintColor: Colors.grey[400],
 | 
						|
        // colorScheme: ColorScheme.fromSwatch(accentColor: MyColors.backgroundColor),
 | 
						|
        disabledColor: Colors.grey[300],
 | 
						|
        // errorColor: const Colors,
 | 
						|
        // scaffoldBackgroundColor: MyColors.backgroundColor,
 | 
						|
        textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.grey, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey),
 | 
						|
        canvasColor: Colors.white,
 | 
						|
        // backgroundColor: const Color.fromRGBO(255, 255, 255, 1),
 | 
						|
        highlightColor: Colors.grey[100]!.withOpacity(0.4),
 | 
						|
        splashColor: Colors.transparent,
 | 
						|
        // primaryColor: primaryColor,
 | 
						|
        // primaryColorDark: primaryColor,
 | 
						|
        // toggleableActiveColor: secondaryColor,
 | 
						|
        // indicatorColor: secondaryColor,
 | 
						|
        bottomSheetTheme: const BottomSheetThemeData(
 | 
						|
          backgroundColor: Color(0xFFE0E0E0),
 | 
						|
        ),
 | 
						|
        // primaryTextTheme: const TextTheme(
 | 
						|
        //   bodyText2: TextStyle(color: Colors.white),
 | 
						|
        // ),
 | 
						|
        // iconTheme: const IconThemeData(color: MyColors.darkTextColor),
 | 
						|
        // textTheme: const 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: const FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2),
 | 
						|
        appBarTheme: AppBarTheme(
 | 
						|
          color: const Color(0xff515A5D),
 | 
						|
          elevation: 0.0,
 | 
						|
          actionsIconTheme: IconThemeData(
 | 
						|
            color: Colors.grey[800],
 | 
						|
          ),
 | 
						|
          systemOverlayStyle: SystemUiOverlayStyle.light,
 | 
						|
        ),
 | 
						|
      );
 | 
						|
}
 | 
						|
 | 
						|
extension ExtendedRevoCheckTheme on TextTheme {
 | 
						|
  //add custom styles and colors here
 | 
						|
  //taken from https://medium.com/@crizantlai/flutter-how-to-extend-themedata-b5b987a95bb5
 | 
						|
  TextStyle get price => const TextStyle(color: Colors.redAccent);
 | 
						|
}
 |