selectFrom method
override
Performs a Logic index
based selection on an List of Logic
named busList
.
Using the Logic index
on which selectFrom is performed on and
a List of Logic named busList
for index
based selection, we can
select any valid element of type Logic within the logicList
using
the index
of Logic type.
Alternatively we can approach this with busList.selectIndex(index)
Example:
// ordering matches closer to array indexing with `0` index-based.
selected <= index.selectFrom(busList);
Implementation
@override
Logic selectFrom(List<Logic> busList, {Logic? defaultValue}) =>
packed.selectFrom(busList, defaultValue: defaultValue);