toggle_bar 0.0.1 toggle_bar: ^0.0.1 copied to clipboard
A horizontal bar of customisable toggle buttons.
toggle_bar #
A dart package to display a horizontal bar of customisable toggle buttons. Supports iOS and Android.
Installation #
Depend on it.
dependencies:
toggle_bar: ^0.0.1
Usage #
import 'package:toggle_bar/toggle_bar.dart';
ToggleBar(
labels: ["Apples", "Bananas", "Oranges", "Watermelons"],
onSelectionUpdated: (index) => // Do something with index
)
Parameters #
@required List<String> labels;
Color backgroundColor;
Color selectedTabColor;
Color selectedTextColor;
Color textColor;
Function(int) onSelectionUpdated;