Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Dart
  2. dart:collection
  3. ListBase<E>
  4. clear method
clear
description

clear method

voidclear()
override

Removes all objects from this list; the length of the list becomes zero.

The list must be growable.

final numbers = <int>[1, 2, 3];numbers.clear();print(numbers.length); // 0print(numbers); // []

Implementation

void clear() {  this.length = 0;}
  1. Dart
  2. dart:collection
  3. ListBase<E>
  4. clear method
ListBase class

[8]ページ先頭

©2009-2025 Movatter.jp