SlideCountdownSeparated class
The SlideCountdownSeparated is a StatefulWidget that creates a countdown timer that slides up or down to display the remaining time and each duration will be separated.
Example usage:
SlideCountdownSeparated(
duration: const Duration(days: 2),
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SlideCountdownSeparated
Constructors
-
SlideCountdownSeparated({Key? key, Duration? duration, TextStyle style = kDefaultTextStyle, TextStyle separatorStyle = kDefaultSeparatorTextStyle, Widget? icon, Widget? suffixIcon, String? separator, Widget? replacement, VoidCallback? onDone, DurationTitle? durationTitle, SeparatorType separatorType = SeparatorType.symbol, SlideDirection slideDirection = SlideDirection.down, EdgeInsets padding = const EdgeInsets.all(5), EdgeInsets separatorPadding = const EdgeInsets.symmetric(horizontal: 3), bool showZeroValue = false, Decoration decoration = kDefaultSeparatedBoxDecoration, bool countUp = false, bool infinityCountUp = false, bool? countUpAtDuration, OverrideDigits? digitsNumber, StreamDuration? streamDuration, ValueChanged<
Duration> ? onChanged, ShouldShowItems? shouldShowDays, ShouldShowItems? shouldShowHours, ShouldShowItems? shouldShowMinutes, ShouldShowItems? shouldShowSeconds, Duration? slideAnimationDuration, Curve? slideAnimationCurve}) -
The SlideCountdownSeparated is a StatefulWidget that
creates a countdown timer that slides up or down to display
the remaining time and each duration will be separated.
const
Properties
- countUp → bool
-
this property allows you to do a count up, give it a value of true to do it
finalinherited
- countUpAtDuration → bool?
-
this property allows you to count up at the duration you set
finalinherited
- decoration → Decoration
-
The decoration to paint in front of the child.
finalinherited
- digitsNumber → OverrideDigits?
-
Default digits is 0-9 if you need change the digits e.g
with arabic number you can use this.
finalinherited
- duration → Duration?
-
Duration is the duration of the countdown slide,
if the duration has finished it will call
onDonefinalinherited - durationTitle → DurationTitle?
-
change
Duration Titleif you want to change the default language, which is English, to another language, for example, into Indonesian pro tips: if you change to Indonesian, we have default valuesDurationTitle.id()finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget?
-
iconis a parameter that can be initialized by any widget e.g Icon, this will be in the first order, default empty widgetfinalinherited - infinityCountUp → bool
-
if you set this property value to true, it will do the count
up continuously or infinity and the
onDoneproperty will never be executed, before doing that you need to set true to thecountUpproperty,finalinherited - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onChanged
→ ValueChanged<
Duration> ? -
if you need to stream the remaining available duration,
it will be called every time the duration changes.
finalinherited
- onDone → VoidCallback?
-
function
onDonewill be called when countdown is completefinalinherited - padding → EdgeInsets
-
The amount of space by which to inset the child.
finalinherited
- replacement → Widget?
-
A widget that will be displayed to replace
the countdown when the remaining
durationhas finished if null default widget is SizedBox.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- separator → String?
-
Separator is a parameter that will separate each
duration, e.g hours by minutes, and you can change the SeparatorType of the symbol or titlefinalinherited - separatorPadding → EdgeInsets
-
The amount of space by which to inset the
separator.finalinherited - separatorStyle → TextStyle
-
TextStyle is a parameter for all existing text,
if this is null SlideCountdown has a default
text style which will be of all text
finalinherited
- separatorType → SeparatorType
-
{$macro separator_type}
finalinherited
- shouldShowDays → ShouldShowItems?
-
This will trigger the days item will show or hide from the return value
You can also show or hide based on the remaining duration
e.g shouldShowDays: (duration) => duration.inDays >= 1
if null and
showZeroValueis false when duration in days is zero it will return falsefinalinherited - shouldShowHours → ShouldShowItems?
-
This will trigger the hours item will show or hide from the return value
You can also show or hide based on the remaining duration
e.g shouldShowHours: (duration) => duration.inHours >= 1
if null and
showZeroValueis false when duration in hours is zero it will return falsefinalinherited - shouldShowMinutes → ShouldShowItems?
-
This will trigger the minutes item will show or hide from the return value
You can also show or hide based on the remaining duration
e.g shouldShowMinutes: (duration) => duration.inMinutes >= 1
if null and
showZeroValueis false when duration in minutes is zero it will return falsefinalinherited - shouldShowSeconds → ShouldShowItems?
-
This will trigger the minutes item will show or hide from the return value
You can also show or hide based on the remaining duration
e.g shouldShowSeconds: (duration) => duration.inSeconds >= 1
if null and
showZeroValueis false when duration in seconds is zero it will return falsefinalinherited - showZeroValue → bool
-
if you initialize it with false, the duration which is empty
will not be displayed
finalinherited
- slideAnimationCurve → Curve?
-
The curve to use for the slide animation.
Defaults to Curves.linear.
finalinherited
- slideAnimationDuration → Duration?
-
The duration of the slide animation.
Defaults to 250 milliseconds.
finalinherited
- slideDirection → SlideDirection
-
An enum for representing the direction of a slide animation.
finalinherited
- streamDuration → StreamDuration?
-
If you ovveride
StreamDurationpackage for stream a duration propertyduration,countUp,infinityCountUp, andonDonein SlideCountdown not affected.finalinherited - style → TextStyle
-
TextStyle is a parameter for all existing text,
if this is null SlideCountdown has a default
text style which will be of all text
finalinherited
- suffixIcon → Widget?
-
iconis a parameter that can be initialized by any widget e.g Icon, this will be in the end order, default empty widgetfinalinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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, int wrapWidth = 65}) → 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