getButtonConstraints method
BoxConstraints?
getButtonConstraints(
- BuildContext context, {
- FastButtonSize? size,
- Widget? icon,
Implementation
BoxConstraints? getButtonConstraints(
BuildContext context, {
FastButtonSize? size,
Widget? icon,
}) {
if (icon != null) {
switch (size) {
case FastButtonSize.large:
return FastIconButtonSpec.large.constraints;
case FastButtonSize.medium:
return FastIconButtonSpec.medium.constraints;
case FastButtonSize.small:
return FastIconButtonSpec.small.constraints;
default:
return FastIconButtonSpec.medium.constraints;
}
}
switch (size) {
case FastButtonSize.large:
return FastButtonSpec.large.constraints;
case FastButtonSize.medium:
return FastButtonSpec.medium.constraints;
case FastButtonSize.small:
return FastButtonSpec.small.constraints;
default:
return FastButtonSpec.medium.constraints;
}
}