elevatedButtonThemeData property
ElevatedButtonThemeData
get
elevatedButtonThemeData
Implementation
ElevatedButtonThemeData get elevatedButtonThemeData {
return ElevatedButtonThemeData(
style: ButtonStyle(
foregroundColor: MaterialStateProperty.resolveWith<Color?>((states) {
if (states.contains(MaterialState.disabled)) {
return kTheme.primary200;
}
return kTheme.secondary;
}),
iconColor: MaterialStateProperty.resolveWith<Color?>((states) {
if (states.contains(MaterialState.disabled)) {
return kTheme.primary200;
}
return kTheme.secondary;
}),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
kTheme.buttonBorderRadius ?? 0,
),
),
),
backgroundColor: MaterialStateProperty.resolveWith<Color?>(
(states) {
if (states.contains(MaterialState.disabled)) {
return kTheme.primary0;
}
return kTheme.accent500;
},
),
textStyle: MaterialStateProperty.all(kTheme.subheadline),
elevation: MaterialStateProperty.all(0),
minimumSize: MaterialStateProperty.all(kTheme.elevatedButtonSize),
),
);
}