Not documented.

Inheritance
Annotations
  • DomName('EventSource')
  • Experimental()

Constants

int CLOSED = 2
const

int CONNECTING = 0
const

EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error')
const

Static factory designed to expose error events to event handlers that are not necessarily instances of EventSource.

EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message')
const

Static factory designed to expose message events to event handlers that are not necessarily instances of EventSource.

int OPEN = 1
const

EventStreamProvider<Event> openEvent = const EventStreamProvider<Event>('open')
const

Static factory designed to expose open events to event handlers that are not necessarily instances of EventSource.

Properties

on Events
read-only, inherited

This is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available.

onError Stream<Event>
read-only

Stream of error events handled by this EventSource.

onMessage Stream<MessageEvent>
read-only

Stream of message events handled by this EventSource.

onOpen Stream<Event>
read-only

Stream of open events handled by this EventSource.

readyState int
read-only

url String
read-only

withCredentials bool
read-only

Constructors

EventSource(String url, {withCredentials: false})

Methods

addEventListener(String type, dynamic listener(Event event), [bool useCapture]) → void
inherited

close() → void

dispatchEvent(Event event) → bool
inherited

removeEventListener(String type, dynamic listener(Event event), [bool useCapture]) → void
inherited