fbmobile/lib/core/services/swipe_service.dart

13 lines
308 B
Dart

import 'dart:async';
import '../enums/swipe_event.dart';
class SwipeService {
StreamController<SwipeEvent> swipeEventController = StreamController<SwipeEvent>.broadcast();
void addEvent(SwipeEvent event) {
if (swipeEventController.hasListener) {
swipeEventController.add(event);
}
}
}