Skip to content

Instantly share code, notes, and snippets.

@vipulasri
Created May 22, 2018 04:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vipulasri/905c5eddcc3a5b8881dd19cdb6a64abd to your computer and use it in GitHub Desktop.
Save vipulasri/905c5eddcc3a5b8881dd19cdb6a64abd to your computer and use it in GitHub Desktop.
Flutter: Bubble Tab Indicator
//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