remove method

  1. @override
bool remove(
  1. Object? value
)
override

Removes the first occurrence of value from this list.

Returns true if value was in the list, false otherwise. The list must be growable.

final parts = ['head', 'shoulders', 'knees', 'toes'].notifier;
final retVal = parts.remove('head'); // true
print(parts); // [shoulders, knees, toes]

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

final parts = ['shoulders', 'knees', 'toes'].notifier;
// Note: 'head' has already been removed.
final retVal = parts.remove('head'); // false
print(parts); // [shoulders, knees, toes]

Implementation

@override
bool remove(Object? value) {
  return _updateOnAction(() => this.value.remove(value));
}