CINXE.COM

List class - dart:core library - Dart API

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no"> <meta name="description" content="API docs for the List class from the dart:core library, for the Dart programming language."> <title>List class - dart:core library - Dart API</title> <link rel="canonical" href="https://api.dart.dev/dart-core/List-class.html"> <link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet"> <link rel="stylesheet" href="../static-assets/github.css?v1"> <link rel="stylesheet" href="../static-assets/styles.css?v1"> <link rel="icon" href="../static-assets/favicon.png?v1"> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-VVQ8908SJ5"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-VVQ8908SJ5'); </script> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preload" href="https://fonts.googleapis.com/css2?family=Google+Sans+Text:wght@400&family=Google+Sans:wght@500&display=swap" as="style"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans+Text:wght@400&family=Google+Sans:wght@500&display=swap"> <link rel="stylesheet" href="https://www.gstatic.com/glue/cookienotificationbar/cookienotificationbar.min.css"> </head> <body data-base-href="../" data-using-base-href="false" class="light-theme"> <div id="overlay-under-drawer"></div> <header id="title"> <span id="sidenav-left-toggle" class="material-symbols-outlined" role="button" tabindex="0">menu</span> <ol class="breadcrumbs gt-separated dark hidden-xs"> <li><a href="../index.html">Dart</a></li> <li><a href="../dart-core/dart-core-library.html">dart:core</a></li> <li class="self-crumb">List<span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span> class</li> </ol> <div class="self-name">List</div> <form class="search navbar-right" role="search"> <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search..."> </form> <div class="toggle" id="theme-button" title="Toggle brightness"> <label for="theme"> <input type="checkbox" id="theme" value="light-theme"> <span id="dark-theme-button" class="material-symbols-outlined"> dark_mode </span> <span id="light-theme-button" class="material-symbols-outlined"> light_mode </span> </label> </div> </header> <main> <div id="dartdoc-main-content" class="main-content" data-above-sidebar="dart-core&#47;dart-core-library-sidebar.html" data-below-sidebar="dart-core&#47;List-class-sidebar.html"> <div> <div id="external-links" class="btn-group"><a title="View source code" class="source-link" href="https://github.com/dart-lang/sdk/blob/88c9758ef131d430d8ce595c6bfb4c90574d3ddd/sdk/lib/core/list.dart#L120"><span class="material-symbols-outlined">description</span></a></div> <h1><span class="kind-class">List&lt;<wbr><span class="type-parameter">E</span>&gt;</span> class <a href="https://dart.dev/language/class-modifiers#abstract" class="feature feature-abstract" title="This type can not be directly constructed.">abstract</a> <a href="https://dart.dev/language/class-modifiers#interface" class="feature feature-interface" title="This class can only be implemented (not extended or mixed in).">interface</a> </h1></div> <section class="desc markdown"> <p>An indexable collection of objects with a length.</p> <p>Subclasses of this class implement different kinds of lists. The most common kinds of lists are:</p> <ul> <li> <p><strong>Fixed-length list</strong></p> <p>An error occurs when attempting to use operations that can change the length of the list.</p> </li> <li> <p><strong>Growable list</strong></p> <p>Full implementation of the API defined in this class.</p> </li> </ul> <p>The default growable list, as created by <code>[]</code>, keeps an internal buffer, and grows that buffer when necessary. This guarantees that a sequence of <a href="../dart-core/List/add.html">add</a> operations will each execute in amortized constant time. Setting the length directly may take time proportional to the new length, and may change the internal capacity so that a following add operation will need to immediately increase the buffer capacity. Other list implementations may have different performance behavior.</p> <p>Example of fixed-length list:</p> <pre class="language-dart"><code class="language-dart">final fixedLengthList = List&lt;int&gt;.filled(5, 0); // Creates fixed-length list. print(fixedLengthList); // [0, 0, 0, 0, 0] fixedLengthList[0] = 87; fixedLengthList.setAll(1, [1, 2, 3]); print(fixedLengthList); // [87, 1, 2, 3, 0] // Fixed length list length can't be changed or increased fixedLengthList.length = 0; // Throws fixedLengthList.add(499); // Throws </code></pre> <p>Example of growable list:</p> <pre class="language-dart"><code class="language-dart">final growableList = &lt;String&gt;['A', 'B']; // Creates growable list. </code></pre> <p>To add data to the growable list, use <a href="../dart-core/List/operator_put.html">operator[]=</a>, <a href="../dart-core/List/add.html">add</a> or <a href="../dart-core/List/addAll.html">addAll</a>.</p> <pre class="language-dart"><code>growableList[0] = 'G'; print(growableList); // [G, B] growableList.add('X'); growableList.addAll({'C', 'B'}); print(growableList); // [G, B, X, C, B] </code></pre> <p>To check whether, and where, the element is in the list, use <a href="../dart-core/List/indexOf.html">indexOf</a> or <a href="../dart-core/List/lastIndexOf.html">lastIndexOf</a>.</p> <pre class="language-dart"><code>final indexA = growableList.indexOf('A'); // -1 (not in the list) final firstIndexB = growableList.indexOf('B'); // 1 final lastIndexB = growableList.lastIndexOf('B'); // 4 </code></pre> <p>To remove an element from the growable list, use <a href="../dart-core/List/remove.html">remove</a>, <a href="../dart-core/List/removeAt.html">removeAt</a>, <a href="../dart-core/List/removeLast.html">removeLast</a>, <a href="../dart-core/List/removeRange.html">removeRange</a> or <a href="../dart-core/List/removeWhere.html">removeWhere</a>.</p> <pre class="language-dart"><code>growableList.remove('C'); growableList.removeLast(); print(growableList); // [G, B, X] </code></pre> <p>To insert an element at position in the list, use <a href="../dart-core/List/insert.html">insert</a> or <a href="../dart-core/List/insertAll.html">insertAll</a>.</p> <pre class="language-dart"><code>growableList.insert(1, 'New'); print(growableList); // [G, New, B, X] </code></pre> <p>To replace a range of elements in the list, use <a href="../dart-core/List/fillRange.html">fillRange</a>, <a href="../dart-core/List/replaceRange.html">replaceRange</a> or <a href="../dart-core/List/setRange.html">setRange</a>.</p> <pre class="language-dart"><code>growableList.replaceRange(0, 2, ['AB', 'A']); print(growableList); // [AB, A, B, X] growableList.fillRange(2, 4, 'F'); print(growableList); // [AB, A, F, F] </code></pre> <p>To sort the elements of the list, use <a href="../dart-core/List/sort.html">sort</a>.</p> <pre class="language-dart"><code>growableList.sort((a, b) =&gt; a.compareTo(b)); print(growableList); // [A, AB, F, F] </code></pre> <p>To shuffle the elements of this list randomly, use <a href="../dart-core/List/shuffle.html">shuffle</a>.</p> <pre class="language-dart"><code>growableList.shuffle(); print(growableList); // e.g. [AB, F, A, F] </code></pre> <p>To find the first element satisfying some predicate, or give a default value if none do, use <a href="../dart-core/Iterable/firstWhere.html">firstWhere</a>.</p> <pre class="language-dart"><code>bool isVowel(String char) =&gt; char.length == 1 &amp;&amp; "AEIOU".contains(char); final firstVowel = growableList.firstWhere(isVowel, orElse: () =&gt; ''); // '' </code></pre> <p>There are similar <a href="../dart-core/Iterable/lastWhere.html">lastWhere</a> and <a href="../dart-core/Iterable/singleWhere.html">singleWhere</a> methods.</p> <p>A list is an <a href="../dart-core/Iterable-class.html">Iterable</a> and supports all its methods, including <a href="../dart-core/Iterable/where.html">where</a>, <a href="../dart-core/Iterable/map.html">map</a>, <a href="../dart-core/Iterable/whereType.html">whereType</a> and <a href="../dart-core/Iterable/toList.html">toList</a>.</p> <p>Lists are <a href="../dart-core/Iterable-class.html">Iterable</a>. Iteration occurs over values in index order. Changing the values does not affect iteration, but changing the valid indices鈥攖hat is, changing the list's length鈥攂etween iteration steps causes a <a href="../dart-core/ConcurrentModificationError-class.html">ConcurrentModificationError</a>. This means that only growable lists can throw ConcurrentModificationError. If the length changes temporarily and is restored before continuing the iteration, the iterator might not detect it.</p> <p>It is generally not allowed to modify the list's length (adding or removing elements) while an operation on the list is being performed, for example during a call to <a href="../dart-core/Iterable/forEach.html">forEach</a> or <a href="../dart-core/List/sort.html">sort</a>. Changing the list's length while it is being iterated, either by iterating it directly or through iterating an <a href="../dart-core/Iterable-class.html">Iterable</a> that is backed by the list, will break the iteration.</p> </section> <section> <dl class="dl-horizontal"> <dt>Implemented types</dt> <dd> <ul class="comma-separated clazz-relationships"> <li><a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></li> <li><a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></li> <li><a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></li> </ul> </dd> <dt>Implementers</dt> <dd><ul class="comma-separated clazz-relationships"> <li><a href="../dart-html/DomRectList-class.html">DomRectList</a></li> <li><a href="../dart-html/DomStringList-class.html">DomStringList</a></li> <li><a href="../dart-html/FileList-class.html">FileList</a></li> <li><a href="../dart-html/HtmlCollection-class.html">HtmlCollection</a></li> <li><a href="../dart-html/ImmutableListMixin-class.html">ImmutableListMixin</a></li> <li><a href="../dart-svg/LengthList-class.html">LengthList</a></li> <li><a href="../dart-collection/ListBase-class.html">ListBase</a></li> <li><a href="../dart-html/MimeTypeArray-class.html">MimeTypeArray</a></li> <li><a href="../dart-html/NodeList-class.html">NodeList</a></li> <li><a href="../dart-svg/NumberList-class.html">NumberList</a></li> <li><a href="../dart-html/PluginArray-class.html">PluginArray</a></li> <li><a href="../dart-html/SourceBufferList-class.html">SourceBufferList</a></li> <li><a href="../dart-html/SpeechGrammarList-class.html">SpeechGrammarList</a></li> <li><a href="../dart-svg/StringList-class.html">StringList</a></li> <li><a href="../dart-html/TextTrackCueList-class.html">TextTrackCueList</a></li> <li><a href="../dart-html/TextTrackList-class.html">TextTrackList</a></li> <li><a href="../dart-html/TouchList-class.html">TouchList</a></li> <li><a href="../dart-svg/TransformList-class.html">TransformList</a></li> <li><a href="../dart-typed_data/TypedDataList-class.html">TypedDataList</a></li> <li><a href="../dart-collection/UnmodifiableListView-class.html">UnmodifiableListView</a></li> </ul></dd> <dt>Available Extensions</dt> <dd><ul class="comma-separated clazz-relationships"> <li><a href="../dart-core/EnumByName.html">EnumByName</a></li> <li><a href="../dart-collection/IterableExtensions.html">IterableExtensions</a></li> <li><a href="../dart-js_interop/ListToJSArray.html">ListToJSArray</a></li> <li><a href="../dart-collection/NullableIterableExtensions.html">NullableIterableExtensions</a></li> </ul></dd> </dl> </section> <section class="summary offset-anchor" id="constructors"> <h2>Constructors</h2> <dl class="constructor-summary-list"> <dt id="List.empty" class="callable"> <span class="name"><a href="../dart-core/List/List.empty.html">List.empty</a></span><span class="signature">({<span class="parameter" id="empty-param-growable"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">growable</span> = <span class="default-value">false</span></span>})</span> </dt> <dd> Creates a new empty list. <div class="constructor-modifier features">factory</div> </dd> <dt id="List.filled" class="callable"> <span class="name"><a href="../dart-core/List/List.filled.html">List.filled</a></span><span class="signature">(<span class="parameter" id="filled-param-length"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">length</span>, </span><span class="parameter" id="filled-param-fill"><span class="type-annotation">E</span> <span class="parameter-name">fill</span>, {</span><span class="parameter" id="filled-param-growable"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">growable</span> = <span class="default-value">false</span></span>})</span> </dt> <dd> Creates a list of the given length with <code>fill</code> at each position. <div class="constructor-modifier features">factory</div> </dd> <dt id="List.from" class="callable"> <span class="name"><a href="../dart-core/List/List.from.html">List.from</a></span><span class="signature">(<span class="parameter" id="from-param-elements"><span class="type-annotation"><a href="../dart-core/Iterable-class.html">Iterable</a></span> <span class="parameter-name">elements</span>, {</span><span class="parameter" id="from-param-growable"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">growable</span> = <span class="default-value">true</span></span>})</span> </dt> <dd> Creates a list containing all <code>elements</code>. <div class="constructor-modifier features">factory</div> </dd> <dt id="List.generate" class="callable"> <span class="name"><a href="../dart-core/List/List.generate.html">List.generate</a></span><span class="signature">(<span class="parameter" id="generate-param-length"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">length</span>, </span><span class="parameter" id="generate-param-generator"><span class="type-annotation">E</span> <span class="parameter-name">generator</span>(<span class="parameter" id="generator-param-index"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">index</span></span>), {</span><span class="parameter" id="generate-param-growable"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">growable</span> = <span class="default-value">true</span></span>})</span> </dt> <dd> Generates a list of values. <div class="constructor-modifier features">factory</div> </dd> <dt id="List.of" class="callable"> <span class="name"><a href="../dart-core/List/List.of.html">List.of</a></span><span class="signature">(<span class="parameter" id="of-param-elements"><span class="type-annotation"><a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> <span class="parameter-name">elements</span>, {</span><span class="parameter" id="of-param-growable"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">growable</span> = <span class="default-value">true</span></span>})</span> </dt> <dd> Creates a list from <code>elements</code>. <div class="constructor-modifier features">factory</div> </dd> <dt id="List.unmodifiable" class="callable"> <span class="name"><a href="../dart-core/List/List.unmodifiable.html">List.unmodifiable</a></span><span class="signature">(<span class="parameter" id="unmodifiable-param-elements"><span class="type-annotation"><a href="../dart-core/Iterable-class.html">Iterable</a></span> <span class="parameter-name">elements</span></span>)</span> </dt> <dd> Creates an unmodifiable list containing all <code>elements</code>. <div class="constructor-modifier features">factory</div> </dd> </dl> </section> <section class="summary offset-anchor" id="instance-properties"> <h2>Properties</h2> <dl class="properties"> <dt id="first" class="property"> <span class="name"><a href="../dart-core/List/first.html">first</a></span> <span class="signature">&#8596; E</span> </dt> <dd> The first element. <div class="features"><span class="feature">getter/setter pair</span><span class="feature">inherited-getter</span></div> </dd> <dt id="hashCode" class="property inherited"> <span class="name"><a href="../dart-core/Object/hashCode.html">hashCode</a></span> <span class="signature">&#8594; <a href="../dart-core/int-class.html">int</a></span> </dt> <dd class="inherited"> The hash code for this object. <div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div> </dd> <dt id="isEmpty" class="property inherited"> <span class="name"><a href="../dart-core/Iterable/isEmpty.html">isEmpty</a></span> <span class="signature">&#8594; <a href="../dart-core/bool-class.html">bool</a></span> </dt> <dd class="inherited"> Whether this collection has no elements. <div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div> </dd> <dt id="isNotEmpty" class="property inherited"> <span class="name"><a href="../dart-core/Iterable/isNotEmpty.html">isNotEmpty</a></span> <span class="signature">&#8594; <a href="../dart-core/bool-class.html">bool</a></span> </dt> <dd class="inherited"> Whether this collection has at least one element. <div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div> </dd> <dt id="iterator" class="property inherited"> <span class="name"><a href="../dart-core/Iterable/iterator.html">iterator</a></span> <span class="signature">&#8594; <a href="../dart-core/Iterator-class.html">Iterator</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </dt> <dd class="inherited"> A new <code>Iterator</code> that allows iterating the elements of this <code>Iterable</code>. <div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div> </dd> <dt id="last" class="property"> <span class="name"><a href="../dart-core/List/last.html">last</a></span> <span class="signature">&#8596; E</span> </dt> <dd> The last element. <div class="features"><span class="feature">getter/setter pair</span><span class="feature">inherited-getter</span></div> </dd> <dt id="length" class="property"> <span class="name"><a href="../dart-core/List/length.html">length</a></span> <span class="signature">&#8596; <a href="../dart-core/int-class.html">int</a></span> </dt> <dd> The number of objects in this list. <div class="features"><span class="feature">getter/setter pair</span><span class="feature">override-getter</span></div> </dd> <dt id="reversed" class="property"> <span class="name"><a href="../dart-core/List/reversed.html">reversed</a></span> <span class="signature">&#8594; <a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </dt> <dd> An <a href="../dart-core/Iterable-class.html">Iterable</a> of the objects in this list in reverse order. <div class="features"><span class="feature">no setter</span></div> </dd> <dt id="runtimeType" class="property inherited"> <span class="name"><a href="../dart-core/Object/runtimeType.html">runtimeType</a></span> <span class="signature">&#8594; <a href="../dart-core/Type-class.html">Type</a></span> </dt> <dd class="inherited"> A representation of the runtime type of the object. <div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div> </dd> <dt id="single" class="property inherited"> <span class="name"><a href="../dart-core/Iterable/single.html">single</a></span> <span class="signature">&#8594; E</span> </dt> <dd class="inherited"> Checks that this iterable has only one element, and returns that element. <div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div> </dd> </dl> </section> <section class="summary offset-anchor" id="instance-methods"> <h2>Methods</h2> <dl class="callables"> <dt id="add" class="callable"> <span class="name"><a href="../dart-core/List/add.html">add</a></span><span class="signature">(<wbr><span class="parameter" id="add-param-value"><span class="type-annotation">E</span> <span class="parameter-name">value</span></span>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Adds <code>value</code> to the end of this list, extending the length by one. </dd> <dt id="addAll" class="callable"> <span class="name"><a href="../dart-core/List/addAll.html">addAll</a></span><span class="signature">(<wbr><span class="parameter" id="addAll-param-iterable"><span class="type-annotation"><a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> <span class="parameter-name">iterable</span></span>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Appends all objects of <code>iterable</code> to the end of this list. </dd> <dt id="any" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/any.html">any</a></span><span class="signature">(<wbr><span class="parameter" id="any-param-test"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">test</span>(<span class="parameter" id="param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>)</span>) <span class="returntype parameter">&#8594; <a href="../dart-core/bool-class.html">bool</a></span> </span> </dt> <dd class="inherited"> Checks whether any element of this iterable satisfies <code>test</code>. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="asMap" class="callable"> <span class="name"><a href="../dart-core/List/asMap.html">asMap</a></span><span class="signature">(<wbr>) <span class="returntype parameter">&#8594; <a href="../dart-core/Map-class.html">Map</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../dart-core/int-class.html">int</a></span>, <span class="type-parameter">E</span>&gt;</span></span> </span> </dt> <dd> An unmodifiable <a href="../dart-core/Map-class.html">Map</a> view of this list. </dd> <dt id="cast" class="callable"> <span class="name"><a href="../dart-core/List/cast.html">cast</a></span><span class="signature">&lt;<wbr><span class="type-parameter">R</span>&gt;</span><span class="signature">(<wbr>) <span class="returntype parameter">&#8594; <a href="../dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter">R</span>&gt;</span></span> </span> </dt> <dd> Returns a view of this list as a list of <code>R</code> instances. <div class="features"><span class="feature">override</span></div> </dd> <dt id="clear" class="callable"> <span class="name"><a href="../dart-core/List/clear.html">clear</a></span><span class="signature">(<wbr>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Removes all objects from this list; the length of the list becomes zero. </dd> <dt id="contains" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/contains.html">contains</a></span><span class="signature">(<wbr><span class="parameter" id="contains-param-element"><span class="type-annotation"><a href="../dart-core/Object-class.html">Object</a>?</span> <span class="parameter-name">element</span></span>) <span class="returntype parameter">&#8594; <a href="../dart-core/bool-class.html">bool</a></span> </span> </dt> <dd class="inherited"> Whether the collection contains an element equal to <code>element</code>. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="elementAt" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/elementAt.html">elementAt</a></span><span class="signature">(<wbr><span class="parameter" id="elementAt-param-index"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">index</span></span>) <span class="returntype parameter">&#8594; E</span> </span> </dt> <dd class="inherited"> Returns the <code>index</code>th element. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="every" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/every.html">every</a></span><span class="signature">(<wbr><span class="parameter" id="every-param-test"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">test</span>(<span class="parameter" id="param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>)</span>) <span class="returntype parameter">&#8594; <a href="../dart-core/bool-class.html">bool</a></span> </span> </dt> <dd class="inherited"> Checks whether every element of this iterable satisfies <code>test</code>. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="expand" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/expand.html">expand</a></span><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span><span class="signature">(<wbr><span class="parameter" id="expand-param-toElements"><span class="type-annotation"><a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></span> <span class="parameter-name">toElements</span>(<span class="parameter" id="param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>)</span>) <span class="returntype parameter">&#8594; <a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></span> </span> </dt> <dd class="inherited"> Expands each element of this <a href="../dart-core/Iterable-class.html">Iterable</a> into zero or more elements. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="fillRange" class="callable"> <span class="name"><a href="../dart-core/List/fillRange.html">fillRange</a></span><span class="signature">(<wbr><span class="parameter" id="fillRange-param-start"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">start</span>, </span><span class="parameter" id="fillRange-param-end"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">end</span>, [</span><span class="parameter" id="fillRange-param-fillValue"><span class="type-annotation">E?</span> <span class="parameter-name">fillValue</span></span>]) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Overwrites a range of elements with <code>fillValue</code>. </dd> <dt id="firstWhere" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/firstWhere.html">firstWhere</a></span><span class="signature">(<wbr><span class="parameter" id="firstWhere-param-test"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">test</span>(<span class="parameter" id="param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>), {</span><span class="parameter" id="firstWhere-param-orElse"><span class="type-annotation">E</span> <span class="parameter-name">orElse</span>()?</span>}) <span class="returntype parameter">&#8594; E</span> </span> </dt> <dd class="inherited"> The first element that satisfies the given predicate <code>test</code>. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="fold" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/fold.html">fold</a></span><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span><span class="signature">(<wbr><span class="parameter" id="fold-param-initialValue"><span class="type-annotation">T</span> <span class="parameter-name">initialValue</span>, </span><span class="parameter" id="fold-param-combine"><span class="type-annotation">T</span> <span class="parameter-name">combine</span>(<span class="parameter" id="param-previousValue"><span class="type-annotation">T</span> <span class="parameter-name">previousValue</span>, </span><span class="parameter" id="param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>)</span>) <span class="returntype parameter">&#8594; T</span> </span> </dt> <dd class="inherited"> Reduces a collection to a single value by iteratively combining each element of the collection with an existing value <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="followedBy" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/followedBy.html">followedBy</a></span><span class="signature">(<wbr><span class="parameter" id="followedBy-param-other"><span class="type-annotation"><a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> <span class="parameter-name">other</span></span>) <span class="returntype parameter">&#8594; <a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </span> </dt> <dd class="inherited"> Creates the lazy concatenation of this iterable and <code>other</code>. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="forEach" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/forEach.html">forEach</a></span><span class="signature">(<wbr><span class="parameter" id="forEach-param-action"><span class="type-annotation">void</span> <span class="parameter-name">action</span>(<span class="parameter" id="param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>)</span>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd class="inherited"> Invokes <code>action</code> on each element of this iterable in iteration order. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="getRange" class="callable"> <span class="name"><a href="../dart-core/List/getRange.html">getRange</a></span><span class="signature">(<wbr><span class="parameter" id="getRange-param-start"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">start</span>, </span><span class="parameter" id="getRange-param-end"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">end</span></span>) <span class="returntype parameter">&#8594; <a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </span> </dt> <dd> Creates an <a href="../dart-core/Iterable-class.html">Iterable</a> that iterates over a range of elements. </dd> <dt id="indexOf" class="callable"> <span class="name"><a href="../dart-core/List/indexOf.html">indexOf</a></span><span class="signature">(<wbr><span class="parameter" id="indexOf-param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span>, [</span><span class="parameter" id="indexOf-param-start"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">start</span> = <span class="default-value">0</span></span>]) <span class="returntype parameter">&#8594; <a href="../dart-core/int-class.html">int</a></span> </span> </dt> <dd> The first index of <code>element</code> in this list. </dd> <dt id="indexWhere" class="callable"> <span class="name"><a href="../dart-core/List/indexWhere.html">indexWhere</a></span><span class="signature">(<wbr><span class="parameter" id="indexWhere-param-test"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">test</span>(<span class="parameter" id="test-param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>), [</span><span class="parameter" id="indexWhere-param-start"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">start</span> = <span class="default-value">0</span></span>]) <span class="returntype parameter">&#8594; <a href="../dart-core/int-class.html">int</a></span> </span> </dt> <dd> The first index in the list that satisfies the provided <code>test</code>. </dd> <dt id="insert" class="callable"> <span class="name"><a href="../dart-core/List/insert.html">insert</a></span><span class="signature">(<wbr><span class="parameter" id="insert-param-index"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">index</span>, </span><span class="parameter" id="insert-param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Inserts <code>element</code> at position <code>index</code> in this list. </dd> <dt id="insertAll" class="callable"> <span class="name"><a href="../dart-core/List/insertAll.html">insertAll</a></span><span class="signature">(<wbr><span class="parameter" id="insertAll-param-index"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">index</span>, </span><span class="parameter" id="insertAll-param-iterable"><span class="type-annotation"><a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> <span class="parameter-name">iterable</span></span>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Inserts all objects of <code>iterable</code> at position <code>index</code> in this list. </dd> <dt id="join" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/join.html">join</a></span><span class="signature">(<wbr>[<span class="parameter" id="join-param-separator"><span class="type-annotation"><a href="../dart-core/String-class.html">String</a></span> <span class="parameter-name">separator</span> = <span class="default-value">&quot;&quot;</span></span>]) <span class="returntype parameter">&#8594; <a href="../dart-core/String-class.html">String</a></span> </span> </dt> <dd class="inherited"> Converts each element to a <a href="../dart-core/String-class.html">String</a> and concatenates the strings. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="lastIndexOf" class="callable"> <span class="name"><a href="../dart-core/List/lastIndexOf.html">lastIndexOf</a></span><span class="signature">(<wbr><span class="parameter" id="lastIndexOf-param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span>, [</span><span class="parameter" id="lastIndexOf-param-start"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a>?</span> <span class="parameter-name">start</span></span>]) <span class="returntype parameter">&#8594; <a href="../dart-core/int-class.html">int</a></span> </span> </dt> <dd> The last index of <code>element</code> in this list. </dd> <dt id="lastIndexWhere" class="callable"> <span class="name"><a href="../dart-core/List/lastIndexWhere.html">lastIndexWhere</a></span><span class="signature">(<wbr><span class="parameter" id="lastIndexWhere-param-test"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">test</span>(<span class="parameter" id="test-param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>), [</span><span class="parameter" id="lastIndexWhere-param-start"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a>?</span> <span class="parameter-name">start</span></span>]) <span class="returntype parameter">&#8594; <a href="../dart-core/int-class.html">int</a></span> </span> </dt> <dd> The last index in the list that satisfies the provided <code>test</code>. </dd> <dt id="lastWhere" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/lastWhere.html">lastWhere</a></span><span class="signature">(<wbr><span class="parameter" id="lastWhere-param-test"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">test</span>(<span class="parameter" id="param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>), {</span><span class="parameter" id="lastWhere-param-orElse"><span class="type-annotation">E</span> <span class="parameter-name">orElse</span>()?</span>}) <span class="returntype parameter">&#8594; E</span> </span> </dt> <dd class="inherited"> The last element that satisfies the given predicate <code>test</code>. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="map" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/map.html">map</a></span><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span><span class="signature">(<wbr><span class="parameter" id="map-param-toElement"><span class="type-annotation">T</span> <span class="parameter-name">toElement</span>(<span class="parameter" id="param-e"><span class="type-annotation">E</span> <span class="parameter-name">e</span></span>)</span>) <span class="returntype parameter">&#8594; <a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></span> </span> </dt> <dd class="inherited"> The current elements of this iterable modified by <code>toElement</code>. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="noSuchMethod" class="callable inherited"> <span class="name"><a href="../dart-core/Object/noSuchMethod.html">noSuchMethod</a></span><span class="signature">(<wbr><span class="parameter" id="noSuchMethod-param-invocation"><span class="type-annotation"><a href="../dart-core/Invocation-class.html">Invocation</a></span> <span class="parameter-name">invocation</span></span>) <span class="returntype parameter">&#8594; dynamic</span> </span> </dt> <dd class="inherited"> Invoked when a nonexistent method or property is accessed. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="reduce" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/reduce.html">reduce</a></span><span class="signature">(<wbr><span class="parameter" id="reduce-param-combine"><span class="type-annotation">E</span> <span class="parameter-name">combine</span>(<span class="parameter" id="param-value"><span class="type-annotation">E</span> <span class="parameter-name">value</span>, </span><span class="parameter" id="param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>)</span>) <span class="returntype parameter">&#8594; E</span> </span> </dt> <dd class="inherited"> Reduces a collection to a single value by iteratively combining elements of the collection using the provided function. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="remove" class="callable"> <span class="name"><a href="../dart-core/List/remove.html">remove</a></span><span class="signature">(<wbr><span class="parameter" id="remove-param-value"><span class="type-annotation"><a href="../dart-core/Object-class.html">Object</a>?</span> <span class="parameter-name">value</span></span>) <span class="returntype parameter">&#8594; <a href="../dart-core/bool-class.html">bool</a></span> </span> </dt> <dd> Removes the first occurrence of <code>value</code> from this list. </dd> <dt id="removeAt" class="callable"> <span class="name"><a href="../dart-core/List/removeAt.html">removeAt</a></span><span class="signature">(<wbr><span class="parameter" id="removeAt-param-index"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">index</span></span>) <span class="returntype parameter">&#8594; E</span> </span> </dt> <dd> Removes the object at position <code>index</code> from this list. </dd> <dt id="removeLast" class="callable"> <span class="name"><a href="../dart-core/List/removeLast.html">removeLast</a></span><span class="signature">(<wbr>) <span class="returntype parameter">&#8594; E</span> </span> </dt> <dd> Removes and returns the last object in this list. </dd> <dt id="removeRange" class="callable"> <span class="name"><a href="../dart-core/List/removeRange.html">removeRange</a></span><span class="signature">(<wbr><span class="parameter" id="removeRange-param-start"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">start</span>, </span><span class="parameter" id="removeRange-param-end"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">end</span></span>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Removes a range of elements from the list. </dd> <dt id="removeWhere" class="callable"> <span class="name"><a href="../dart-core/List/removeWhere.html">removeWhere</a></span><span class="signature">(<wbr><span class="parameter" id="removeWhere-param-test"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">test</span>(<span class="parameter" id="test-param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>)</span>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Removes all objects from this list that satisfy <code>test</code>. </dd> <dt id="replaceRange" class="callable"> <span class="name"><a href="../dart-core/List/replaceRange.html">replaceRange</a></span><span class="signature">(<wbr><span class="parameter" id="replaceRange-param-start"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">start</span>, </span><span class="parameter" id="replaceRange-param-end"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">end</span>, </span><span class="parameter" id="replaceRange-param-replacements"><span class="type-annotation"><a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> <span class="parameter-name">replacements</span></span>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Replaces a range of elements with the elements of <code>replacements</code>. </dd> <dt id="retainWhere" class="callable"> <span class="name"><a href="../dart-core/List/retainWhere.html">retainWhere</a></span><span class="signature">(<wbr><span class="parameter" id="retainWhere-param-test"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">test</span>(<span class="parameter" id="test-param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>)</span>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Removes all objects from this list that fail to satisfy <code>test</code>. </dd> <dt id="setAll" class="callable"> <span class="name"><a href="../dart-core/List/setAll.html">setAll</a></span><span class="signature">(<wbr><span class="parameter" id="setAll-param-index"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">index</span>, </span><span class="parameter" id="setAll-param-iterable"><span class="type-annotation"><a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> <span class="parameter-name">iterable</span></span>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Overwrites elements with the objects of <code>iterable</code>. </dd> <dt id="setRange" class="callable"> <span class="name"><a href="../dart-core/List/setRange.html">setRange</a></span><span class="signature">(<wbr><span class="parameter" id="setRange-param-start"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">start</span>, </span><span class="parameter" id="setRange-param-end"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">end</span>, </span><span class="parameter" id="setRange-param-iterable"><span class="type-annotation"><a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> <span class="parameter-name">iterable</span>, [</span><span class="parameter" id="setRange-param-skipCount"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">skipCount</span> = <span class="default-value">0</span></span>]) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Writes some elements of <code>iterable</code> into a range of this list. </dd> <dt id="shuffle" class="callable"> <span class="name"><a href="../dart-core/List/shuffle.html">shuffle</a></span><span class="signature">(<wbr>[<span class="parameter" id="shuffle-param-random"><span class="type-annotation"><a href="../dart-math/Random-class.html">Random</a>?</span> <span class="parameter-name">random</span></span>]) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Shuffles the elements of this list randomly. </dd> <dt id="singleWhere" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/singleWhere.html">singleWhere</a></span><span class="signature">(<wbr><span class="parameter" id="singleWhere-param-test"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">test</span>(<span class="parameter" id="param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>), {</span><span class="parameter" id="singleWhere-param-orElse"><span class="type-annotation">E</span> <span class="parameter-name">orElse</span>()?</span>}) <span class="returntype parameter">&#8594; E</span> </span> </dt> <dd class="inherited"> The single element that satisfies <code>test</code>. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="skip" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/skip.html">skip</a></span><span class="signature">(<wbr><span class="parameter" id="skip-param-count"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">count</span></span>) <span class="returntype parameter">&#8594; <a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </span> </dt> <dd class="inherited"> Creates an <a href="../dart-core/Iterable-class.html">Iterable</a> that provides all but the first <code>count</code> elements. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="skipWhile" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/skipWhile.html">skipWhile</a></span><span class="signature">(<wbr><span class="parameter" id="skipWhile-param-test"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">test</span>(<span class="parameter" id="param-value"><span class="type-annotation">E</span> <span class="parameter-name">value</span></span>)</span>) <span class="returntype parameter">&#8594; <a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </span> </dt> <dd class="inherited"> Creates an <code>Iterable</code> that skips leading elements while <code>test</code> is satisfied. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="sort" class="callable"> <span class="name"><a href="../dart-core/List/sort.html">sort</a></span><span class="signature">(<wbr>[<span class="parameter" id="sort-param-compare"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">compare</span>(<span class="parameter" id="compare-param-a"><span class="type-annotation">E</span> <span class="parameter-name">a</span>, </span><span class="parameter" id="compare-param-b"><span class="type-annotation">E</span> <span class="parameter-name">b</span></span>)?</span>]) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Sorts this list according to the order specified by the <code>compare</code> function. </dd> <dt id="sublist" class="callable"> <span class="name"><a href="../dart-core/List/sublist.html">sublist</a></span><span class="signature">(<wbr><span class="parameter" id="sublist-param-start"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">start</span>, [</span><span class="parameter" id="sublist-param-end"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a>?</span> <span class="parameter-name">end</span></span>]) <span class="returntype parameter">&#8594; <a href="../dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </span> </dt> <dd> Returns a new list containing the elements between <code>start</code> and <code>end</code>. </dd> <dt id="take" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/take.html">take</a></span><span class="signature">(<wbr><span class="parameter" id="take-param-count"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">count</span></span>) <span class="returntype parameter">&#8594; <a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </span> </dt> <dd class="inherited"> Creates a lazy iterable of the <code>count</code> first elements of this iterable. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="takeWhile" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/takeWhile.html">takeWhile</a></span><span class="signature">(<wbr><span class="parameter" id="takeWhile-param-test"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">test</span>(<span class="parameter" id="param-value"><span class="type-annotation">E</span> <span class="parameter-name">value</span></span>)</span>) <span class="returntype parameter">&#8594; <a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </span> </dt> <dd class="inherited"> Creates a lazy iterable of the leading elements satisfying <code>test</code>. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="toList" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/toList.html">toList</a></span><span class="signature">(<wbr>{<span class="parameter" id="toList-param-growable"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">growable</span> = <span class="default-value">true</span></span>}) <span class="returntype parameter">&#8594; <a href="../dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </span> </dt> <dd class="inherited"> Creates a <a href="../dart-core/List-class.html">List</a> containing the elements of this <a href="../dart-core/Iterable-class.html">Iterable</a>. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="toSet" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/toSet.html">toSet</a></span><span class="signature">(<wbr>) <span class="returntype parameter">&#8594; <a href="../dart-core/Set-class.html">Set</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </span> </dt> <dd class="inherited"> Creates a <a href="../dart-core/Set-class.html">Set</a> containing the same elements as this iterable. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="toString" class="callable inherited"> <span class="name"><a href="../dart-core/Object/toString.html">toString</a></span><span class="signature">(<wbr>) <span class="returntype parameter">&#8594; <a href="../dart-core/String-class.html">String</a></span> </span> </dt> <dd class="inherited"> A string representation of this object. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="where" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/where.html">where</a></span><span class="signature">(<wbr><span class="parameter" id="where-param-test"><span class="type-annotation"><a href="../dart-core/bool-class.html">bool</a></span> <span class="parameter-name">test</span>(<span class="parameter" id="param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>)</span>) <span class="returntype parameter">&#8594; <a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </span> </dt> <dd class="inherited"> Creates a new lazy <a href="../dart-core/Iterable-class.html">Iterable</a> with all elements that satisfy the predicate <code>test</code>. <div class="features"><span class="feature">inherited</span></div> </dd> <dt id="whereType" class="callable inherited"> <span class="name"><a href="../dart-core/Iterable/whereType.html">whereType</a></span><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span><span class="signature">(<wbr>) <span class="returntype parameter">&#8594; <a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></span> </span> </dt> <dd class="inherited"> Creates a new lazy <a href="../dart-core/Iterable-class.html">Iterable</a> with all elements that have type <code>T</code>. <div class="features"><span class="feature">inherited</span></div> </dd> </dl> </section> <section class="summary offset-anchor" id="operators"> <h2>Operators</h2> <dl class="callables"> <dt id="operator +" class="callable"> <span class="name"><a href="../dart-core/List/operator_plus.html">operator +</a></span><span class="signature">(<wbr><span class="parameter" id="+-param-other"><span class="type-annotation"><a href="../dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> <span class="parameter-name">other</span></span>) <span class="returntype parameter">&#8594; <a href="../dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span></span> </span> </dt> <dd> Returns the concatenation of this list and <code>other</code>. </dd> <dt id="operator ==" class="callable"> <span class="name"><a href="../dart-core/List/operator_equals.html">operator ==</a></span><span class="signature">(<wbr><span class="parameter" id="==-param-other"><span class="type-annotation"><a href="../dart-core/Object-class.html">Object</a></span> <span class="parameter-name">other</span></span>) <span class="returntype parameter">&#8594; <a href="../dart-core/bool-class.html">bool</a></span> </span> </dt> <dd> Whether this list is equal to <code>other</code>. <div class="features"><span class="feature">override</span></div> </dd> <dt id="operator []" class="callable"> <span class="name"><a href="../dart-core/List/operator_get.html">operator []</a></span><span class="signature">(<wbr><span class="parameter" id="[]-param-index"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">index</span></span>) <span class="returntype parameter">&#8594; E</span> </span> </dt> <dd> The object at the given <code>index</code> in the list. </dd> <dt id="operator []=" class="callable"> <span class="name"><a href="../dart-core/List/operator_put.html">operator []=</a></span><span class="signature">(<wbr><span class="parameter" id="[]=-param-index"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">index</span>, </span><span class="parameter" id="[]=-param-value"><span class="type-annotation">E</span> <span class="parameter-name">value</span></span>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Sets the value at the given <code>index</code> in the list to <code>value</code>. </dd> </dl> </section> <section class="summary offset-anchor" id="static-methods"> <h2>Static Methods</h2> <dl class="callables"> <dt id="castFrom" class="callable"> <span class="name"><a href="../dart-core/List/castFrom.html">castFrom</a></span><span class="signature">&lt;<wbr><span class="type-parameter">S</span>, <span class="type-parameter">T</span>&gt;</span><span class="signature">(<wbr><span class="parameter" id="castFrom-param-source"><span class="type-annotation"><a href="../dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter">S</span>&gt;</span></span> <span class="parameter-name">source</span></span>) <span class="returntype parameter">&#8594; <a href="../dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></span> </span> </dt> <dd> Adapts <code>source</code> to be a <code>List&lt;T&gt;</code>. <div class="features"><span class="feature">override</span></div> </dd> <dt id="copyRange" class="callable"> <span class="name"><a href="../dart-core/List/copyRange.html">copyRange</a></span><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span><span class="signature">(<wbr><span class="parameter" id="copyRange-param-target"><span class="type-annotation"><a href="../dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></span> <span class="parameter-name">target</span>, </span><span class="parameter" id="copyRange-param-at"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">at</span>, </span><span class="parameter" id="copyRange-param-source"><span class="type-annotation"><a href="../dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></span> <span class="parameter-name">source</span>, [</span><span class="parameter" id="copyRange-param-start"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a>?</span> <span class="parameter-name">start</span>, </span><span class="parameter" id="copyRange-param-end"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a>?</span> <span class="parameter-name">end</span></span>]) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Copy a range of one list into another list. </dd> <dt id="writeIterable" class="callable"> <span class="name"><a href="../dart-core/List/writeIterable.html">writeIterable</a></span><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span><span class="signature">(<wbr><span class="parameter" id="writeIterable-param-target"><span class="type-annotation"><a href="../dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></span> <span class="parameter-name">target</span>, </span><span class="parameter" id="writeIterable-param-at"><span class="type-annotation"><a href="../dart-core/int-class.html">int</a></span> <span class="parameter-name">at</span>, </span><span class="parameter" id="writeIterable-param-source"><span class="type-annotation"><a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></span> <span class="parameter-name">source</span></span>) <span class="returntype parameter">&#8594; void</span> </span> </dt> <dd> Write the elements of an iterable into a list. </dd> </dl> </section> </div> <!-- /.main-content --> <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left"> <!-- The search input and breadcrumbs below are only responsively visible at low resolutions. --> <header id="header-search-sidebar" class="hidden-l"> <form class="search-sidebar" role="search"> <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search..."> </form> </header> <ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav"> <li><a href="../index.html">Dart</a></li> <li><a href="../dart-core/dart-core-library.html">dart:core</a></li> <li class="self-crumb">List<span class="signature">&lt;<wbr><span class="type-parameter">E</span>&gt;</span> class</li> </ol> <h5>dart:core library</h5> <div id="dartdoc-sidebar-left-content"></div> </div> <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right"> </div><!--/.sidebar-offcanvas--> </main> <footer> <span class="no-break"> Dart 3.5.4 </span> <span class="glue-footer"> <span class="no-break"> | <a href="https://dart.dev/terms" title="Terms of use">Terms</a> </span> <span class="no-break"> | <a href="https://policies.google.com/privacy" target="_blank" rel="noopener" title="Privacy policy" class="no-automatic-external">Privacy</a> </span> <span class="no-break"> | <a href="https://dart.dev/security" title="Security philosophy and practices">Security</a> </span> <div class="copyright" style="font-size: 0.9em; color: darkgrey; margin-top: 0.5em;"> Except as otherwise noted, this site is licensed under a <a style="color: darkgrey;" href="https://creativecommons.org/licenses/by/4.0/"> Creative Commons Attribution 4.0 International License</a> and code samples are licensed under the <a style="color: darkgrey;" href="https://opensource.org/licenses/BSD-3-Clause" class="no-automatic-external"> 3-Clause BSD License</a> </div> </span> </footer> <script src="../static-assets/highlight.pack.js?v1"></script> <script src="../static-assets/docs.dart.js"></script> <button aria-hidden="true" class="glue-footer__link glue-cookie-notification-bar-control"> Cookies management controls </button> <script src="https://www.gstatic.com/glue/cookienotificationbar/cookienotificationbar.min.js" data-glue-cookie-notification-bar-category="2B"> </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10