Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Dart
  2. dart:html
  3. SpeechGrammarList
  4. first property
first
description

first property

SpeechGrammar getfirst
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");}
setfirst(SpeechGrammarvalue)
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;}
  1. Dart
  2. dart:html
  3. SpeechGrammarList
  4. first property
SpeechGrammarList class

[8]ページ先頭

©2009-2025 Movatter.jp