dart / 2.17.0 / dart-html / storage / clear.html /

clear method

void clear( )
override

Removes all entries from the map.

After this, the map is empty.

final planets = <int, String>{1: 'Mercury', 2: 'Venus', 3: 'Earth'};
planets.clear(); // {}

Implementation

void clear() => _clear();

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.17.0/dart-html/Storage/clear.html