fluttercommunity/font_awesome_flutter

FaIcon size 24

Closed this issue · 1 comments

Describe the bug
How to make icon take no more than 24 px by longest side?

To Reproduce

        SizedBox.square(
          dimension: 24,
          child: const FaIcon(
            FontAwesomeIcons.building,
            size: 24,
          ),
        )

Expected behavior
The icon should be no more than specified size

Screenshots
image

Hey, your container needs a clipBehavior specified if you want to crop. Otherwise, since font awesome icons are not square there is always the chance that they are larger/smaller in width/height than anticipated. However, this is a limitation by font awesome and not by this library