WorkerScriptPut class

Constructors

WorkerScriptPut({Object? bindings, String? compatibilityDate, List<String> compatibilityFlags = const [], String? mainModule, String? script})
Returns a new WorkerScriptPut instance.

Properties

bindings ↔ Object?
getter/setter pair
compatibilityDate ↔ String?
CompatibilityDate pins which Workers runtime behaviour the script runs under, as a plain calendar date ("2024-01-01"). Absent leaves the account's own default in force.
getter/setter pair
compatibilityFlags ↔ List<String>
CompatibilityFlags turn individual runtime behaviours on or off around that date ("nodejs_compat"), in Cloudflare's own flag vocabulary. Absent means the date alone decides.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
mainModule ↔ String?
MainModule is the module file the runtime starts at. Absent means "worker.js".
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
script ↔ String?
Script means two things on this route, and the document says so in both places it appears: the PATH segment names the Worker to publish, and the BODY field carries that Worker's ES-module source — the code itself, never a name or a URL. A blank or absent source is refused; there is no empty Worker.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → WorkerScriptPut?
Returns a new WorkerScriptPut instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<WorkerScriptPut>
mapFromJson(dynamic json) → Map<String, WorkerScriptPut>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<WorkerScriptPut>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.