YaruPageIndicator class
A responsive page indicator.
If there's enough space, it will be rendered into a line of dots, if not, it will be rendered into a text-based indicator.
See also:
- YaruCarousel, display a list of widgets in a carousel view.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- YaruPageIndicator
Constructors
-
YaruPageIndicator({Key? key, required int length, required int page, ValueChanged<
int> ? onTap, MouseCursor? mouseCursor, YaruPageIndicatorTextBuilder? textBuilder, TextStyle? textStyle, double? dotSize, double? dotSpacing, Duration? animationDuration, Curve? animationCurve}) - Create a YaruPageIndicator.
-
YaruPageIndicator.builder({Key? key, required int length, required int page, ValueChanged<
int> ? onTap, YaruPageIndicatorItemBuilder<Size> ? itemSizeBuilder, YaruPageIndicatorItemBuilder<Widget> ? itemBuilder, MouseCursor? mouseCursor, YaruPageIndicatorTextBuilder? textBuilder, TextStyle? textStyle, YaruPageIndicatorLayoutDelegate? layoutDelegate, Duration? animationDuration, Curve? animationCurve}) - Create a YaruPageIndicator.
Properties
- animationCurve → Curve?
-
Curve used in a size transition between two items.
final
- animationDuration → Duration?
-
Duration of a size transition between two items.
Use Duration.zero to disable transition.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
itemBuilder
→ YaruPageIndicatorItemBuilder<
Widget> ? -
Returns the Widget of a given item.
final
-
itemSizeBuilder
↔ YaruPageIndicatorItemBuilder<
Size> ? -
Returns the Size of a given item.
These values are used to compute the layout using layoutDelegate.
If you want an animated items size, just return the largest bounds.
latefinal
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- layoutDelegate ↔ YaruPageIndicatorLayoutDelegate?
-
Controls the items spacing, depending on the vertical constraints.
latefinal
- length → int
-
Determine the number of pages.
final
- mouseCursor → MouseCursor?
-
The cursor for a mouse pointer when it enters or is hovering over the widget.
final
-
onTap
→ ValueChanged<
int> ? -
Callback called when tapping a dot.
It passes the tapped page index as parameter.
final
- page → int
-
Current page index.
This value should be clamped between 0 and length - 1
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textBuilder → YaruPageIndicatorTextBuilder?
-
Returns the Widget of the text based indicator.
Be careful to use something small enough to fit in a small vertical constraints.
final
- textStyle → TextStyle?
-
Text style used to customize the default text based indicator.
Useless if you set a custom textBuilder;
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited