theme top-level property
Implementation
ThemeData theme = ThemeData(
brightness: Brightness.light,
primaryColor: AppColors.themeColor,
indicatorColor: Colors.white,
primaryColorLight: AppColors.themeColor,
scaffoldBackgroundColor: Colors.white,
hintColor: Colors.black54,
appBarTheme: AppBarTheme(
backgroundColor: AppColors.themeColor,
actionsIconTheme: const IconThemeData(color: Colors.white),
titleTextStyle: GoogleFonts.workSans(
fontSize: 18, fontStyle: FontStyle.normal, color: Colors.white),
),
cardColor: Colors.white,
cardTheme: CardTheme(
color: Colors.white,
elevation: 8,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12))),
// splashColor: AppColors.red,
textSelectionTheme: const TextSelectionThemeData(
cursorColor: AppColors.red, // selectionColor: Colors.green,
selectionHandleColor: AppColors.red,
),
iconTheme: const IconThemeData(color: Colors.black),
listTileTheme: const ListTileThemeData(
iconColor: Colors.black,
),
inputDecorationTheme: const InputDecorationTheme(
hintStyle: TextStyle(color: Colors.black54),
suffixIconColor: AppColors.themeColor,
prefixIconColor: AppColors.themeColor,
focusColor: Colors.white54,
contentPadding: EdgeInsets.symmetric(vertical: 9.0, horizontal: 9.0),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(width: 1, color: AppColors.red)),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(width: 1, color: AppColors.textFieldBorderColor),
),
border: OutlineInputBorder(
borderSide:
BorderSide(width: 1, color: AppColors.textFieldBorderColor)),
fillColor: AppColors.white,
filled: true,
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: ButtonStyle(
iconColor: MaterialStateProperty.all(AppColors.themeColor))),
textTheme: TextTheme(
titleMedium: GoogleFonts.workSans(
fontSize: isiPad ? 25 : 20,
fontWeight: FontWeight.w400,
color: Colors.black),
titleSmall: GoogleFonts.workSans(
fontSize: isiPad ? 22 : 16,
fontWeight: FontWeight.w400,
color: Colors.black),
bodySmall: GoogleFonts.workSans(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
bodyMedium: GoogleFonts.workSans(
fontSize: isiPad ? 20 : 17,
fontStyle: FontStyle.normal,
color: Colors.black),
labelSmall: GoogleFonts.workSans(
fontSize:isiPad ? 20 : 13 ,
fontWeight: FontWeight.w500,
color: Colors.black
), labelMedium: GoogleFonts.workSans(
fontSize:isiPad ? 23 : 15 ,
fontWeight: FontWeight.w500,
color: Colors.black
),
),
dialogBackgroundColor: Colors.white,
expansionTileTheme: const ExpansionTileThemeData(
backgroundColor: Colors.white,
iconColor: AppColors.themeColor,
collapsedIconColor: Colors.black,
collapsedBackgroundColor: Colors.white,
textColor: Colors.black),
checkboxTheme: CheckboxThemeData(
fillColor: MaterialStateProperty.all(AppColors.themeColor),
),
progressIndicatorTheme: ProgressIndicatorThemeData(
refreshBackgroundColor: AppColors.themeColor));