theme property
Implementation
static ThemeData theme = ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: const Color(0xff3276E2)),
scaffoldBackgroundColor: Colors.white,
brightness: Brightness.light,
floatingActionButtonTheme: const FloatingActionButtonThemeData(
shape: CircleBorder(),
),
appBarTheme: const AppBarTheme(
backgroundColor: Color(0xffF2F2F2),
shadowColor: Colors.white,
surfaceTintColor: Colors.white,
iconTheme: IconThemeData(color: Color(0xff181818)),
titleTextStyle: TextStyle(
color: Color(0xff181818),
fontSize: 20,
fontWeight: FontWeight.bold)),
hintColor: Colors.black26,
fontFamily: 'sf_ui',
progressIndicatorTheme:
const ProgressIndicatorThemeData(color: buttonBgColor),
dialogTheme: const DialogTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0)),
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ButtonStyle(
backgroundColor:
WidgetStateProperty.resolveWith<Color>((Set<WidgetState> states) {
if (states.contains(WidgetState.disabled)) {
return Colors.grey; // Color when the button is disabled
}
return const Color(0xff3276E2); // Default color
}),
foregroundColor:
WidgetStateProperty.resolveWith<Color>((Set<WidgetState> states) {
if (states.contains(WidgetState.disabled)) {
return Colors.white
.withOpacity(0.5); // Text color when the button is disabled
}
return Colors.white; // Default text color
}),
textStyle: WidgetStateProperty.resolveWith<TextStyle>(
(Set<WidgetState> states) {
if (states.contains(WidgetState.disabled)) {
return TextStyle(
color: Colors.white.withOpacity(
0.5)); // Text color when the button is disabled
}
return const TextStyle(color: Colors.white); // Default text color
}),
padding: WidgetStateProperty.all<EdgeInsetsGeometry>(
const EdgeInsets.symmetric(horizontal: 55, vertical: 15)),
shape: WidgetStateProperty.all<OutlinedBorder>(
RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.0))),
),
/*ElevatedButton.styleFrom(
backgroundColor: const Color(0xff3276E2),
disabledBackgroundColor: Colors.grey,
textStyle: const TextStyle(color: Colors.white, fontSize: 14,fontWeight: FontWeight.w600),
shape: const StadiumBorder())*/
),
/*textTheme: const TextTheme(
labelLarge: TextStyle(color: Colors.white),
titleLarge: TextStyle(
fontSize: 14.0, fontWeight: FontWeight.bold, fontFamily: 'sf_ui'),
titleMedium: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w700,
fontFamily: 'sf_ui',
// color: textHintColor
),
titleSmall: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
fontFamily: 'sf_ui',
color: textColor
),
),*/
);