FlutterTabBarLite.horizontal constructor
FlutterTabBarLite.horizontal({
- Key? key,
- bool scrollable = false,
- List<
String> ? titles, - List<
IconData> ? prefixIcons, - List<
IconData> ? suffixIcons, - Color? backgroundColor = Colors.blue,
- Color selectedTextColor = Colors.black87,
- Color unselectedItemTextColor = Colors.white,
- Color selectedItemBgColor = Colors.white,
- Color unselectedItemBgColor = Colors.transparent,
- double selectedFontSize = 16,
- double unselectedFontSize = 14,
- dynamic onTabChange(
- int index
- Duration animationDuration = const Duration(milliseconds: 300),
- LinearGradient? gradient,
- EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 4),
- EdgeInsets itemPadding = const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
- EdgeInsets itemMargin = const EdgeInsets.symmetric(horizontal: 3, vertical: 5),
- double iconSize = 20.0,
- double? spaceBetweenIconAndText = 4.0,
- bool animateItemSize = true,
- double borderRadius = 8,
- double itemBorderRadius = 4,
Implementation
factory FlutterTabBarLite.horizontal({
Key? key,
bool scrollable = false,
List<String>? titles,
List<IconData>? prefixIcons,
List<IconData>? suffixIcons,
Color? backgroundColor = Colors.blue,
Color selectedTextColor = Colors.black87,
Color unselectedItemTextColor = Colors.white,
Color selectedItemBgColor = Colors.white,
Color unselectedItemBgColor = Colors.transparent,
double selectedFontSize = 16,
double unselectedFontSize = 14,
Function(int index)? onTabChange,
Duration animationDuration = const Duration(milliseconds: 300),
LinearGradient? gradient,
EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 4),
EdgeInsets itemPadding =
const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
EdgeInsets itemMargin =
const EdgeInsets.symmetric(horizontal: 3, vertical: 5),
double iconSize = 20.0,
double? spaceBetweenIconAndText = 4.0,
bool animateItemSize = true,
double borderRadius = 8,
double itemBorderRadius = 4,
}) {
return FlutterTabBarLite._internal(
key: key,
scrollable: scrollable,
titles: titles,
prefixIcons: prefixIcons,
suffixIcons: suffixIcons,
backgroundColor: backgroundColor,
selectedTextColor: selectedTextColor,
unselectedItemTextColor: unselectedItemTextColor,
selectedItemBgColor: selectedItemBgColor,
unselectedItemBgColor: unselectedItemBgColor,
onTabChange: onTabChange,
animationDuration: animationDuration,
padding: padding,
itemPadding: itemPadding,
itemMargin: itemMargin,
iconSize: iconSize,
gradient: gradient,
spaceBetweenIconAndText: spaceBetweenIconAndText,
axis: Axis.horizontal,
selectedFontSize: selectedFontSize,
unselectedFontSize: unselectedFontSize,
animateItemSize: animateItemSize,
borderRadius: borderRadius,
itemBorderRadius: itemBorderRadius,
);
}