map<Inner, Msg> static method
Map a subscription from a message to a new subscription with another message.
Implementation
static Sub<Msg> map<Inner, Msg>(
String idPrefix, Sub<Inner> sub, Msg Function(Inner) f) =>
Sub(sub._subs.map((inner) {
final (subId, subscribe) = inner;
return (
[idPrefix, ...subId],
(dispatch) => subscribe((innerDispatch) => dispatch(f(innerDispatch)))
);
}).toList());