EventHandler constructor
EventHandler({
- bool sync = false,
创建一个EventHandler。
如果 sync 为 true,则事件在 post 调用期间直接传递给流的侦听器。
如果为 false(默认值),则在创建事件的代码完成后,事件将在稍后时间传递给侦听器。
Implementation
EventHandler({bool sync = false}) : _broadcast = StreamController.broadcast(sync: sync);