SlideCountdown 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:
SlideCountdown(
duration: const Duration(days: 2),
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SlideCountdown
Constructors
-
SlideCountdown({Key? key, Duration? duration, TextStyle style = kDefaultTextStyle, TextStyle separatorStyle = kDefaultTextStyle, Widget? icon, Widget? suffixIcon, String? separator, Widget? replacement, VoidCallback? onDone, DurationTitle? durationTitle, SeparatorType separatorType = SeparatorType.symbol, SlideDirection slideDirection = SlideDirection.down, EdgeInsets padding = kDefaultPadding, EdgeInsets separatorPadding = kDefaultSeparatorPadding, bool showZeroValue = false, Decoration decoration = kDefaultBoxDecoration, bool countUp = false, bool infinityCountUp = false, bool? countUpAtDuration, OverrideDigits? digitsNumber, StreamDuration? streamDuration, ValueChanged<
Duration> ? onChanged, ShouldShowItems? shouldShowDays, ShouldShowItems? shouldShowHours, ShouldShowItems? shouldShowMinutes, ShouldShowItems? shouldShowSeconds}) -
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 onDone
finalinherited
- durationTitle → DurationTitle?
-
change
Duration Title
if 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?
-
icon is a parameter that can be initialized by any widget e.g Icon,
this will be in the first order, default empty widget
finalinherited
- infinityCountUp → bool
-
if you set this property value to true, it will do the count
up continuously or infinity and the onDone property will never
be executed, before doing that you need to set true to
the countUp property,
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 onDone will be called when countdown is complete
finalinherited
- 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 duration has 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 title
finalinherited
- 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 showZeroValue is false
when duration in days is zero it will return false
finalinherited
- 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 showZeroValue is false
when duration in hours is zero it will return false
finalinherited
- 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 showZeroValue is false
when duration in minutes is zero it will return false
finalinherited
- 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 showZeroValue is false
when duration in seconds is zero it will return false
finalinherited
- showZeroValue → bool
-
if you initialize it with false, the duration which is empty
will not be displayed
finalinherited
- slideDirection → SlideDirection
-
An enum for representing the direction of a slide animation.
finalinherited
- streamDuration → StreamDuration?
-
If you ovveride StreamDuration package for stream a duration
property duration, countUp, infinityCountUp, and onDone
in 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?
-
icon is a parameter that can be initialized by any widget e.g Icon,
this will be in the end order, default empty widget
finalinherited
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}) → 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