onEvent method

void onEvent(
  1. void action(
    1. String? value
    )
)

Listen event

Implementation

void onEvent(void Function(String? value) action) {
  streamer.stream.listen((value) {
    action(value);
  });
}