Search packages, repositories and app categories

Package detailsv1.0.0

toggle_bar

A horizontal bar of toggle tabs with customisable colors and labels.

30-day downloads
26
Likes
44
Pub points
40

Install package

flutter pub add toggle_bar

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that provides a horizontal bar of toggle tabs, allowing users to switch between different views or states. Each tab can be customized with labels and colors, offering a clean and interactive UI component for navigation or filtering. The package is lightweight and easy to integrate into existing Flutter projects, ideal for settings panels, content filters, or segmented controls. It supports smooth transitions and state management through built-in callbacks.

Use cases

  • Navigation between sections
  • Filtering content by category
  • User preference settings
  • Segmented control interfaces
  • Form step navigation

Key features

  • Customizable tab labels
  • Configurable colors
  • Smooth transition animations
  • State change callbacks
  • Easy integration with Flutter
  • Responsive design

Suitable for

  • Simple navigation components
  • Filtering interfaces
  • Settings UIs
  • Mobile app dashboards
  • Interactive form wizards

Considerations

  • Limited to horizontal layout
  • No built-in icons support
  • Requires manual state management
  • Not suitable for complex nested navigation
  • Minimal customization beyond colors and labels

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

toggle_bar

pub package Build Status

A dart package to display a horizontal bar of customisable toggle tabs. Supports iOS and Android.

Installation

Depend on it.

dependencies:
  toggle_bar: ^1.0.0

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;
BoxBorder backgroundBorder;
TextStyle labelTextStyle;
Function(int) onSelectionUpdated;

Categories

Source repository

Projects using this package

No data available yet.