StopWatchTimer class
StopWatchTimer
Constructors
- StopWatchTimer({bool isLapHours = true, StopWatchMode mode = StopWatchMode.countUp, int presetMillisecond = 0, int refreshTime = 1, void onChange(int)?, void onChangeRawSecond(int)?, void onChangeRawMinute(int)?, void onStopped()?, void onEnded()?})
Properties
-
fetchEnded
→ Stream<
bool> -
no setter
-
fetchStopped
→ Stream<
bool> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialPresetTime → int
-
no setter
- isLapHours → bool
-
final
- isRunning → bool
-
no setter
-
minuteTime
→ ValueStream<
int> -
no setter
- mode → StopWatchMode
-
final
- onChange → (void Function(int)?)
-
final
- onChangeRawMinute → (void Function(int)?)
-
final
- onChangeRawSecond → (void Function(int)?)
-
final
- onEnded → (void Function()?)
-
final
- onStopped → (void Function()?)
-
final
-
rawTime
→ ValueStream<
int> -
no setter
-
records
→ ValueStream<
List< StopWatchRecord> > -
no setter
- refreshTime → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
secondTime
→ ValueStream<
int> -
no setter
Methods
-
clearPresetTime(
) → void -
dispose(
) → Future< void> - When finish running timer, it need to dispose.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onAddLap(
) → void - Add Lap.
-
onResetTimer(
) → void - Reset timer.
-
onStartTimer(
) → void - Start timer.
-
onStopTimer(
) → void - Stop timer.
-
setPresetHoursTime(
int value, {bool add = true}) → void - Get display millisecond time.
-
setPresetMinuteTime(
int value, {bool add = true}) → void -
setPresetSecondTime(
int value, {bool add = true}) → void -
setPresetTime(
{required int mSec, bool add = true}) → void - Set preset time. 1000 mSec => 1 sec
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getDisplayTime(
int value, {bool hours = true, bool minute = true, bool second = true, bool milliSecond = true, String hoursRightBreak = ':', String minuteRightBreak = ':', String secondRightBreak = '.'}) → String - Get display time.
-
getDisplayTimeHours(
int mSec) → String - Get display hours time.
-
getDisplayTimeMillisecond(
int mSec) → String - Get display millisecond time.
-
getDisplayTimeMinute(
int mSec, {bool hours = false}) → String - Get display minute time.
-
getDisplayTimeSecond(
int mSec) → String - Get display second time.
-
getMilliSecFromHour(
int hour) → int - Get milli second from hour
-
getMilliSecFromMinute(
int minute) → int - Get milli second from minute
-
getMilliSecFromSecond(
int second) → int - Get milli second from second
-
getMinute(
int milliSecond) → int - Get Raw Minute. 0 ~ 59. 1 hours = 0.
-
getRawHours(
int milliSecond) → int - Get Raw Hours.
-
getRawMinute(
int milliSecond) → int - Get Raw Minute
-
getRawSecond(
int milliSecond) → int - Get Raw Second