import 'package:rxdart/rxdart.dart';

import 'bloc_provider.dart';

class ApplicationBloc implements BlocBase {
  BehaviorSubject<int> _appEvent = BehaviorSubject<int>();
  // 入口
  Sink<int> get _appEventSink => _appEvent.sink;
  // 出口
  Stream<int> get appEventStream => _appEvent.stream;

  @override
  void dispose() {
    _appEvent.close();
  }

  @override
  Future getData({String labelId, int page}) {
    // TODO: implement getData
    return null;
  }

  @override
  Future onLoadMore({String labelId}) {
    // TODO: implement onLoadMore
    return null;
  }

  @override
  Future onRefresh({String labelId}) {
    // TODO: implement onRefresh
    return null;
  }

  void sendAppEvent(int type) {
    _appEventSink.add(type);
  }
}
