BasicIndicatorEffect class abstract

Basic implementation of IndicatorEffect that holds some shared properties and behaviors between different effects

Inheritance

Constructors

BasicIndicatorEffect({required double strokeWidth, required double dotWidth, required double dotHeight, required double spacing, required double radius, required Color? dotColor, required PaintingStyle paintStyle, required Color? activeDotColor})
Default construe
const

Properties

activeDotColor Color?
The active dot color If null, defaults to the app's primary color
final
dotColor Color?
Inactive dots color or all dots in some effects If null, defaults to the app's primary color with reduced opacity
final
dotHeight double
Singe dot height
final
dotWidth double
Singe dot width
final
hashCode int
The hash code for this object.
no setterinherited
paintStyle PaintingStyle
Inactive dots paint style (fill|stroke) defaults to fill.
final
radius double
Single dot radius
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spacing double
The horizontal space between dots
final
strokeWidth double
This is ignored if paintStyle is PaintStyle.fill
final

Methods

buildPainter(int count, double offset, DefaultIndicatorColors indicatorColors) IndicatorPainter
Builds a new painter every time the page offset changes
inherited
calculateSize(int count) Size
Calculates the size of canvas based on dots count, size and spacing
override
hitTestDots(double dx, int count, double current) int
Returns the index of the section that contains dx.
override
lerp(covariant IndicatorEffect? other, double t) IndicatorEffect
Linearly interpolates between two effects. Returns this if other is null or not the same type.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

lerpDouble(double? a, double? b, double t) double?
Helper method for lerping double values