JobDefinition class
A factory wrapper that defines how to create scheduled job instances from config.
Useful when loading jobs dynamically from configuration files or external sources.
Example:
JobDefinition(
name: 'cleanup_job',
factory: (config) => CleanupJob(),
)
Constructors
-
JobDefinition({required String name, required ScheduledJob factory(Map<
String, dynamic> config)})
Properties
-
factory
→ ScheduledJob Function(Map<
String, dynamic> config) -
A function that returns a ScheduledJob instance using provided config.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Unique identifier of the job definition (usually the job type).
final
- 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