getIconSize method
double
getIconSize(
- BuildContext context, {
- FastButtonSize? size,
- double? iconSize,
- Widget? icon,
Implementation
double getIconSize(
BuildContext context, {
FastButtonSize? size,
double? iconSize,
Widget? icon,
}) {
if (iconSize != null) return iconSize;
if ((icon is FaIcon) && icon.size != null) return icon.size!;
if ((icon is Icon) && icon.size != null) return icon.size!;
if (size != null) {
switch (size) {
case FastButtonSize.large:
return FastIconButtonSpec.large.iconSize;
case FastButtonSize.medium:
return FastIconButtonSpec.medium.iconSize;
case FastButtonSize.small:
return FastIconButtonSpec.small.iconSize;
}
}
return kFastIconSizeSmall;
}