fbmobile/lib/core/services/refresh_service.dart

15 lines
330 B
Dart
Raw Normal View History

import 'dart:async';
import '../enums/refresh_event.dart';
class RefreshService {
2023-01-16 00:44:34 +00:00
StreamController<RefreshEvent> refreshEventController =
StreamController<RefreshEvent>.broadcast();
void addEvent(RefreshEvent event) {
if (refreshEventController.hasListener) {
refreshEventController.add(event);
}
}
}