first property
override
The first element.
Throws aStateError ifthis is empty.Otherwise returns the first element in the iteration order,equivalent tothis.elementAt(0).
Implementation
SpeechGrammar get first { if (this.length > 0) { return JS('SpeechGrammar', '#[0]', this); } throw new StateError("No elements");}inherited
The first element of the list.
The list must be non-empty when accessing its first element.
The first element of a list can be modified, unlike anIterable.Alist.first is equivalent tolist[0],both for getting and setting the value.
final numbers = <int>[1, 2, 3];print(numbers.first); // 1numbers.first = 10;print(numbers.first); // 10numbers.clear();numbers.first; // Throws.Implementation
void set first(E value) { if (length == 0) throw IterableElementError.noElement(); this[0] = value;}