bool remove(
Object value
)

Removes the first occurence of value from this list.

Returns true if value was in the list, false otherwise.

List<String> parts = ['head', 'shoulders', 'knees', 'toes'];
parts.remove('head'); // true
parts.join(', ');     // 'shoulders, knees, toes'

The method has no effect if value was not in the list.

// Note: 'head' has already been removed.
parts.remove('head'); // false
parts.join(', ');     // 'shoulders, knees, toes'

An UnsupportedError occurs if the list is fixed-length.

Source

/**
 * Removes the first occurence of [value] from this list.
 *
 * Returns true if [value] was in the list, false otherwise.
 *
 *     List<String> parts = ['head', 'shoulders', 'knees', 'toes'];
 *     parts.remove('head'); // true
 *     parts.join(', ');     // 'shoulders, knees, toes'
 *
 * The method has no effect if [value] was not in the list.
 *
 *     // Note: 'head' has already been removed.
 *     parts.remove('head'); // false
 *     parts.join(', ');     // 'shoulders, knees, toes'
 *
 * An [UnsupportedError] occurs if the list is fixed-length.
 */
bool remove(Object value);