

import 'package:rxdart/subjects.dart';

class MainScaffoldProvider {

  BehaviorSubject<int> _pageSubject;
  Stream<int> get pageStream => _pageSubject.stream;
  get setPage => _pageSubject.sink.add;

  static MainScaffoldProvider _instancia;
  factory MainScaffoldProvider() {
    if(_instancia==null) _instancia = MainScaffoldProvider._internal();
    return _instancia;
  }
  MainScaffoldProvider._internal() {
    _pageSubject = new BehaviorSubject();
    setPage(0);
  }

}