map<T> method
T
map<T>({
- required T front,
- required T back,
Maps the side to a value of type T, allowing for a clean switch.
Implementation
T map<T>({required T front, required T back}) {
switch (this) {
case BodySide.front:
return front;
case BodySide.back:
return back;
}
}