fluttercommunity / fluttercommunity/font_awesome_flutter

Actual Icon height is greater than `size`

Open
#270 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
905
Forks
293
PR merge metrics
No merged PRs in 30d

Description

[**Describe the bug**
FaIcon widgets are bigger than expected. This widget: `FaIcon(FontAwesomeIcons.one, size: 200)`, for example, renders at about 100x209 pixels.

**To reproduce**
In the following example you can clearly see that the height of the container is greater than 200 pixels. Using the Flutter devtools, you can see that the size of the FaIcon widget is 100x209 pixels.
```
Container(
decoration: BoxDecoration(border: Border.all()),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const FaIcon(FontAwesomeIcons.one, size: 200),
Container(width: 10, height: 200, color: Colors.red),
],
),
),
```

**Expected behavior**
I would expect the height of the icon in the example to be 200 pixels

**Screenshots**
![font-awesom-size](https://github.com/user-attachments/assets/181e150e-9f73-4373-9679-191bfaddf47f)

**Desktop**
Taken from `flutter doctor`:
```
Flutter (Channel stable, 3.24.4, on NixOS 25.05 (Warbler) 6.6.64, locale en_US.UTF-8)
```
I do not currently have the necessary tools installed to run this example in debug mode on any platform other than Linux, although I can confirm that this problem is also present when building for the web, with the same observation as on my NixOS desktop with the example above.

**Additional notes**
https://github.com/fluttercommunity/font_awesome_flutter/pull/144 fixes this issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.