https://github.com/adithyaxx/toggle_bar
A horizontal bar of customisable toggle buttons.
https://github.com/adithyaxx/toggle_bar
dart flutter toggle-buttons
Last synced: 3 months ago
JSON representation
A horizontal bar of customisable toggle buttons.
- Host: GitHub
- URL: https://github.com/adithyaxx/toggle_bar
- Owner: adithyaxx
- License: mit
- Created: 2019-10-20T06:59:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-09T16:32:42.000Z (over 4 years ago)
- Last Synced: 2025-10-23T04:43:24.874Z (7 months ago)
- Topics: dart, flutter, toggle-buttons
- Language: Dart
- Size: 208 KB
- Stars: 9
- Watchers: 1
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# toggle_bar
[](https://pub.dartlang.org/packages/toggle_bar) [](https://travis-ci.com/adithyaxx/toggle_bar)
A dart package to display a horizontal bar of customisable toggle tabs. Supports iOS and Android.

## Installation
Depend on it.
``` dart
dependencies:
toggle_bar: ^1.0.0
```
## Usage
``` yaml
import 'package:toggle_bar/toggle_bar.dart';
ToggleBar(
labels: ["Apples", "Bananas", "Oranges", "Watermelons"],
onSelectionUpdated: (index) => // Do something with index
)
```
## Parameters
```dart
@required List labels;
Color backgroundColor;
Color selectedTabColor;
Color selectedTextColor;
Color textColor;
BoxBorder backgroundBorder;
TextStyle labelTextStyle;
Function(int) onSelectionUpdated;
```