Last updated:
0 purchases
md2 tab indicator
md2_tab_indicator / MD2 Tab Indicator #
MD2TabIndicator is a tab indicator influenced by Google's Material Design 2 tab indicator design and developed by westdabestdb.
Getting Started #
Add this to your package's pubspec.yaml file:
...
dependencies:
md2_tab_indicator: ^1.0.2
copied to clipboard
Now in your Dart code, you can use:
import 'package:md2_tab_indicator/md2_tab_indicator.dart';
copied to clipboard
Usage #
TabBar(
labelStyle: TextStyle( //up to your taste
fontWeight: FontWeight.w700
),
indicatorSize: TabBarIndicatorSize.label, //makes it better
labelColor: Color(0xff1a73e8), //Google's sweet blue
unselectedLabelColor: Color(0xff5f6368), //niceish grey
isScrollable: true, //up to your taste
indicator: MD2Indicator( //it begins here
indicatorHeight: 3,
indicatorColor: Color(0xff1a73e8),
indicatorSize: MD2IndicatorSize.normal //3 different modes tiny-normal-full
),
tabs: <Widget>[
Tab(
text: "Home",
),
Tab(
text: "Personal info",
),
Tab(
text: "Data & personalization",
),
Tab(
text: "Security",
)
],
),
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.