defaultErrorButtonStyle static method
Returns the default error button style for the given FDBType.
Implementation
static ButtonStyle defaultErrorButtonStyle(FDBType buttonType) {
switch (buttonType) {
case FDBType.elevated:
return ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.red[300]),
foregroundColor: MaterialStateProperty.all(Colors.white),
);
case FDBType.filled:
return ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.red),
foregroundColor: MaterialStateProperty.all(Colors.white),
);
case FDBType.filledTonal:
return ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.red[300]),
foregroundColor: MaterialStateProperty.all(Colors.white),
);
case FDBType.outlined:
return ButtonStyle(
foregroundColor: MaterialStateProperty.all(Colors.red[300]),
side: MaterialStateProperty.all(
BorderSide(color: Colors.red[300]!),
),
);
case FDBType.text:
return ButtonStyle(
foregroundColor: MaterialStateProperty.all(Colors.red[300]),
);
}
}