pedromassango / bottom_navy_bar

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

added BottemNavigationBarTheme compatibility #72

Open casvanluijtelaar opened 3 years ago

casvanluijtelaar commented 3 years ago

I modified this package previously for personal use, but thought it might be a useful addition to the package.

This is a major change. It adds compatibility with BottomNavigationBarTheme and BottomNavigationBarThemeData. This not only adds way more customisability but more importantly, allows for better integration with an apps theme through ThemeData

my implementation of individual per icon theming is a bit flaky (but works just fine), comments explain why.

I've updated the example to be the same but with current theming implementation. I updated the current tests so they pass. Some extra tests will probably have to be written but decided to poll for some opinions here first.

codecov-io commented 3 years ago

Codecov Report

Merging #72 (2f45ee8) into master (08d0b31) will increase coverage by 4.39%. The diff coverage is 78.12%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #72      +/-   ##
==========================================
+ Coverage   79.74%   84.14%   +4.39%     
==========================================
  Files           1        1              
  Lines          79       82       +3     
==========================================
+ Hits           63       69       +6     
+ Misses         16       13       -3     
Impacted Files Coverage Δ
lib/bottom_navy_bar.dart 84.14% <78.12%> (+4.39%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 08d0b31...2f45ee8. Read the comment docs.

casvanluijtelaar commented 3 years ago

currently the showSelectedLabels and showUnselectedLabels options of the BottomNavigationBarThemeData are not implemented. Not something I'm planning on added in this pull request but might be an interesting feature where label visibility can be customised to your liking.