Source
Future onData(S cmd) async { if (cmd is AsyncCommand) state = await (cmd as AsyncCommand<T>).execAsync(state); else state = (cmd as Command<T>).exec(state); _controller.add(state); }
Future onData(S cmd) async { if (cmd is AsyncCommand) state = await (cmd as AsyncCommand<T>).execAsync(state); else state = (cmd as Command<T>).exec(state); _controller.add(state); }