rafalbednarczuk / curved_navigation_bar

Animated Curved Navigation Bar in Flutter
BSD 2-Clause "Simplified" License
694 stars 242 forks source link

FontAwesome Icons Appear Above bottomNavigationBar #65

Closed mike-altonji closed 4 years ago

mike-altonji commented 4 years ago

When using the example code provided on the pub.dev page, but changing the icons to "FontAwesome" icons, the FontAwesome Icons appear halfway in/out of the bottomNavigationBar. Below is a snippet of the bottomNavigationBar code.

bottomNavigationBar: CurvedNavigationBar( key: _bottomNavigationKey, index: 0, height: 50.0, items: <Widget>[ FaIcon(FontAwesomeIcons.calendarAlt, size: 30), FaIcon(FontAwesomeIcons.stethoscope, size: 30), Icon(Icons.people, size: 30), ], color: Colors.white, buttonBackgroundColor: Colors.white, backgroundColor: Theme.of(context).primaryColor, animationCurve: Curves.easeInOut, animationDuration: Duration(milliseconds: 600), onTap: (index) { setState(() { _page = index; }); }, ),

Below is the resulting navigation bar. The calendar and stethoscope are FontAwesome icons, and the "people" is a regular icon. Note the following: 1) When not clicked, FontAwesome Icons appear above the bar. 2) When clicked, FontAwesome Icons appear correctly. 3) Regular icons appear correctly.

image

hsiraaj commented 4 years ago

same problem if I use asset image instead of Icon. like SvgPicture with height and width works correctly when selected but when it is not selected, the image is way too big.