NyScheduler class
Nylo's Scheduler class This class is used to schedule tasks to run at a later time.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
-
key(
String name) → String - The secure storage key
-
readBool(
String name) → Future< bool> -
Read a boolean value from the local storage
Provide a
name
for the value you want to read. -
readValue(
String name) → Future< String?> -
Read a value from the local storage
Provide a
name
for the value you want to read. -
taskDaily(
String name, dynamic callback(), {DateTime? endAt}) → dynamic -
Run a task daily
Provide a
name
for the function and acallback
to execute. The function will execute every day. You can also provide anendAt
date to stop the task from running. You can also provide afrequency
to run the task weekly, monthly or yearly. Example: -
taskOnce(
String name, dynamic callback()) → dynamic -
Run a function once
Provide a
name
for the function and acallback
to execute. The function will only execute once. -
taskOnceAfterDate(
String name, dynamic callback(), {required DateTime date}) → dynamic -
Run a task after date
Provide a
name
for the function and acallback
to execute. The function will execute after thedate
provided. Example: -
writeBool(
String name, bool value) → Future -
Write a bool value to the local storage
Provide a
name
for the value and avalue
to write. -
writeValue(
String name, String value) → Future -
Write a value to the local storage
Provide a
name
for the value and avalue
to write.