pedromassango / bottom_navy_bar

A beautiful and animated bottom navigation
https://youtu.be/jJPSKEEiN-E
Apache License 2.0
1.02k stars 215 forks source link

Don't use specific widgets #54

Closed JCKodel closed 4 years ago

JCKodel commented 4 years ago

BottomNavyBar forces us to pass an Icon and a Text. If those properties are of type Widget, then we can pass a lot more usefull things, like SVG icons with badges, etc.

I did this change and it should work without any breaking changes:

class BottomNavyBarItem {
  final Widge icon; // <--- Widget instead of Icon
  final Widget title; // <--- Widget instead of Text
  final Color activeColor;
  final Color inactiveColor;
  final TextAlign textAlign;

  BottomNavyBarItem({
    @required this.icon,
    @required this.title,
    this.activeColor = Colors.blue,
    this.textAlign,
    this.inactiveColor,
  }) {
    assert(icon != null);
    assert(title != null);
  }
}
pedromassango commented 4 years ago

I made it that way to make sure the developer follow the design of the package. Also it is more easy to implement.

imarindam commented 4 years ago

+1 on this. Need SVG, cause I made my Icons myself.

JCKodel commented 4 years ago

+1 on this. Need SVG, cause I made my Icons myself.

Don't bother. Fork it and apply the fix. An open source project that does not listen to users and don't accept PR is not worth being used.