replaceAll method

IList<T> replaceAll({
  1. required T from,
  2. required T to,
})

Finds all occurrences of from, and replace them with to.

Implementation

IList<T> replaceAll({required T from, required T to}) =>
    map((element) => (element == from) ? to : element).toIList(config);