2021-02-04 00:07:03 +00:00
|
|
|
import 'dart:async';
|
|
|
|
|
|
|
|
import '../enums/refresh_event.dart';
|
|
|
|
|
|
|
|
class RefreshService {
|
2021-04-06 12:00:00 +00:00
|
|
|
StreamController<RefreshEvent> refreshEventController = StreamController<RefreshEvent>.broadcast();
|
2021-02-04 00:07:03 +00:00
|
|
|
|
|
|
|
void addEvent(RefreshEvent event) {
|
2021-04-06 12:00:00 +00:00
|
|
|
if (refreshEventController.hasListener) {
|
|
|
|
refreshEventController.add(event);
|
2021-02-04 00:07:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|