EventSource class abstract

EventSource

Constructors

EventSource.connect(String url, {Map<String, String>? headers, bool? withCredentials})
Connect to the url.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
ondata ↔ (void Function(String event, String? data)?)
ondata
getter/setter pair
onerror ↔ (void Function(Object? error)?)
onerror
getter/setter pair
onopen ↔ (void Function()?)
onopen
getter/setter pair
readyState int
readyState
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
url
no setter

Methods

close() → void
Close the EventSource.
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

Constants

closed → const int
CLOSED = 2
connecting → const int
CONNECTING = 0
open → const int
OPEN = 1