EventSource class abstract
- Inheritance
-
- Object
- EventTarget
- EventSource
- Implementers
Constructors
- EventSource(String url, {bool? withCredentials = false})
-
factory
- EventSource.internal()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- on → Events
-
no setterinherited
-
onError
→ Stream<
Event> -
no setter
-
onMessage
→ Stream<
MessageEvent> -
no setter
-
onOpen
→ Stream<
Event> -
no setter
- readyState → int?
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- url → String
-
URL of this event source.
no setter
- withCredentials → bool?
-
Value of
withCredentialsgiven in the constructor.no setter
Methods
-
addEventListener(
String type, EventListener listener, [bool? useCapture]) → void -
inherited
-
close(
) → void - Closes the event stream.
-
dispatchEvent(
Event event) → bool -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeEventListener(
String type, EventListener listener, [bool? useCapture]) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- CLOSED → const int
- CONNECTING → const int
-
errorEvent
→ const EventStreamProvider<
Event> -
Static factory designed to expose
errorevents to event handlers that are not necessarily instances of EventSource. -
messageEvent
→ const EventStreamProvider<
MessageEvent> -
Static factory designed to expose
messageevents to event handlers that are not necessarily instances of EventSource. - OPEN → const int
-
openEvent
→ const EventStreamProvider<
Event> -
Static factory designed to expose
openevents to event handlers that are not necessarily instances of EventSource.