Created
May 22, 2018 04:02
-
-
Save vipulasri/905c5eddcc3a5b8881dd19cdb6a64abd to your computer and use it in GitHub Desktop.
Flutter: Bubble Tab Indicator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//In this, we will create a variable to hold [indicatorHeight] i.e 15.0 | |
//Now, we will create a new offset to set the x-axis position of tab according to the TabIndicatorSize i.e label or tab start. | |
//And set the y-axis to tab height center position and subtracting the value of indicatorHeight center value. | |
final Rect rect = Offset(offset.dx, (configuration.size.height/2) - indicatorHeight/2) & Size(configuration.size.width, indicatorHeight); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment