blob: 091d8581b681258c96daf54368c86fd8ef9f80c5 [file] [log] [blame]
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
extension ListExtension<E> on List<E> {
void addIfNotNull(E? element) {
if (element != null) {
add(element);
}
}
}