Aus öffentlichen Paketdaten erstellte Orientierung.
Ein Flutter-Paket, das einen visuellen Punkteindikator bereitstellt, um die aktuelle Position innerhalb eines scrollbaren Widgets wie PageView anzuzeigen. Es hilft Benutzern, ihren Fortschritt durch eine Folge von Seiten oder Slides zu verstehen, mit anpassbarem Aussehen und Verhalten der Punkte. Der Indikator unterstützt verschiedene Themen, Größen und Animationen und ist ideal für Onboarding-Bildschirme, Bildschau-Widgets und geführte Touren. Er ist leichtgewichtig und kompatibel mit allen wichtigen Plattformen.
Anwendungsfälle
Onboarding-Bildschirme
Bildschubladen
Führungen
Formularwizard
Karussell-Navigation
Diashow-Indikatoren
Hauptmerkmale
Anpassbare Punktgröße und -farbe
Glatte Animation zwischen Seiten
Unterstützt mehrere Themen
Reaktives Design
Einfache Integration mit PageView
Platform-agnostic
Geeignet für
Mobile-App-Entwickler
UI/UX-Designer
Onboarding-Flows
Interaktive Tutorials
Mehrfachseitiger Inhalt wird angezeigt
Hinweise
Benötigt manuelle Synchronisierung mit PageView
Eingeschränkte Anpassung über das Styling hinaus
Keine integrierten Swipegesten
Nicht geeignet für nicht scrollbare Inhalte
Möglicherweise ist zusätzliche Zustandsverwaltung erforderlich
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
dots_indicator
Widget to display dots indicator to show a position (for a PageView for example).
Breaking change in 5.0.0: this package now uses the standalone
material_ui package instead of
package:flutter/material.dart. Your app must also use material_ui (or
keep the deprecated MaterialUiCompatibilityBridge), otherwise tapping a
dot (onTap) throws No Material widget found. Requires Flutter
>=3.44.0 and Dart ^3.12.0. See the CHANGELOG for
details.
Quick start
The typical use case is to pair DotsIndicator with a PageView, syncing
position to the controller's current page:
You can change the default size of dots and also shape.
So you can choose to have a shape for inactive dots and another shape for the active dot for example. By default, the shape of dots are CircleBorder, so to have a rounded rectangle for active one, you need to change activeShape
By default a dot have a margin of 6 pixels on his left and right. It's EdgeInsets.symmetric(horizontal: 6.0).
But if you want you can change it, for example to increase the space between dots or to add top margin.
There is two other property, axis and reversed.
Axis is to display dots indicator horizontally (default) or vertically.
Also, you can set reversed: true to reverse the order of dots. (default: false).
For example, if you want to display the dots indicator vertically, but with the first dots on bottom :
Set axis: Axis.vertical and reversed: true.
Obviously, you can use reversed with Axis.horizontal.
When dotsCount is large (or unknown), showing every dot isn't practical.
Set fadeOutLastDot: true with a fadeOutDistance to only keep a window of
dots fully visible around the current position, fading the rest out — and
animate: true to transition smoothly as position changes.