Pakete, Repositories und App-Kategorien suchen

Cover von animated_segmented_tab_control
Paketdetailsv2.2.0

animated_segmented_tab_control

Ein anpassbarer Segmentsteuerelement, der mit einer TabView verwendet werden kann.

AndroidiOSWebmacOSWindowsLinux
30-Tage-Downloads
4130
Likes
100
Pub-Punkte
160

Paket installieren

flutter pub add animated_segmented_tab_control

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

Ein anpassbarer animierter Segmentsteuerung, der nahtlos mit TabView in Flutter-Anwendungen funktioniert. Sie bietet reibungslose Übergänge zwischen Segmenten, unterstützt verschiedene Stiloptionen und verbessert die Benutzerinteraktion durch dynamische visuelle Rückmeldungen. Ideal für Anwendungen, die eine intuitive Tab-Navigation mit einem modernen Ästhetik erfordern. Das Paket ist auf allen wichtigen Plattformen einschließlich Android, iOS, Web, macOS, Windows und Linux kompatibel.

Anwendungsfälle

  • Interaktive Registerkarten-Navigation
  • Dynamische UI-Übergänge
  • Anpassbare Tab-Oberflächen
  • Plattformübergreifende Registerkartensteuerung
  • Verbesserte Benutzererfahrung in Dashboards
  • Formularabschnittswechsel

Hauptmerkmale

  • Glatte animierte Übergänge
  • Hochgradig anpassbare Erscheinung
  • Eingebaute Unterstützung für TabView
  • Reaktives Design über Plattformen hinweg
  • Einfache Integration in bestehende Flutter-Projekte
  • Unterstützt sowohl horizontale als auch vertikale Layouts

Geeignet für

  • Entwickler, die plattformübergreifende Anwendungen erstellen
  • Designer, die moderne UI-Komponenten suchen
  • Apps mit mehreren Inhaltsschnitten
  • Projekte, die interaktive Registerkarten-Erfahrungen erfordern
  • Teams, die eine konsistente Benutzererfahrung über Geräte hinweg priorisieren

Hinweise

  • Kann zusätzliche Stilisierung für komplexe Themen erfordern
  • Leistungsbeeinträchtigung bei großen Anzahlen von Segmenten
  • Eingeschränkte integrierte Barrierefreiheitsfunktionen
  • Abhängig von der externen TabView-Implementierung
  • Nicht für extrem hohe Aktualisierungshäufigkeiten optimiert

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

A customizable segment tab control. Can be used with or without TabView.

Made in lanars.com.

pub package

Features

The package provides an advanced segmented control widget based on the TabController.

Usage

The package contains a SegmentedTabControl widget that requires a SegmentTab list.

SegmentedTabControl(
  tabs: [
    SegmentTab(
      label: 'Home',
    ),
  ],
)

SegmentedTabControl also requires a TabController. You can provide it with a DefaultTabController or instantiate a TabController instead.

DefaultTabController(
  length: 2,
  child: SegmentedTabControl(
    tabs: [
      SegmentTab(
        label: 'Home',
      ),
      SegmentTab(
        label: 'Account',
      ),
    ],
  ),
)

You can style the whole widget, an individual tab, or both. A value on the currently selected SegmentTab overrides the corresponding value on SegmentedTabControl.

SegmentedTabControl(
  barDecoration: BoxDecoration(
    color: Colors.grey.shade300,
    borderRadius: BorderRadius.circular(10),
  ),
  indicatorDecoration: BoxDecoration(
    color: Colors.orange.shade200,
    borderRadius: BorderRadius.circular(10),
  ),
  tabTextColor: Colors.black45,
  selectedTabTextColor: Colors.white,
  tabs: [
    SegmentTab(
      label: 'ACCOUNT',
      color: Colors.red.shade200,
    ),
    SegmentTab(
      label: 'HOME',
      backgroundColor: Colors.blue.shade100,
      selectedTextColor: Colors.black45,
      textColor: Colors.black26,
    ),
    const SegmentTab(label: 'NEW'),
  ],
)

Note that the text colors are read from the selected tab and applied to the whole bar, so textColor and selectedTextColor set the bar's label colors while that tab is selected rather than coloring only that one tab.

Change tracking logic is identical to TabBar logic.

DefaultTabController.of(context).index

or

_controller.index

Сustom tab content

Use SegmentTab.labelBuilder to show any widget like an icon.

The selected-tab highlight is produced by painting the tab row twice and clipping the upper copy to the indicator, so the builder is called once per layer and receives the color of the layer it is painting. Plain Icon and Text children inherit that color. Use color for anything that does not inherit it, such as a border or an SVG:

SegmentTab(
  label: 'NEW',
  labelBuilder: (context, color) => Container(
    padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
    decoration: BoxDecoration(
      border: Border.all(color: color),
      borderRadius: BorderRadius.circular(20),
    ),
    child: Text('NEW'),
  ),
)

Interactive children are not supported.

Additional information

If you have any ideas or are running into a bug, please submit an issue on github page: https://github.com/LanarsInc/animated-segmented-tab-control/issues

Kategorien

Abhängigkeiten

Abhängigkeiten 1 Einträge

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.