import 'package:bloc/bloc.dart';

abstract class TitikCorouselEvent {
  int? index;
}

class TitikCorousel extends TitikCorouselEvent {
  TitikCorousel.setTitik(int _index) {
    index = _index;
  }
}

class TitikCorouselBloc extends Bloc<TitikCorouselEvent, int> {
  int? initstates = 0;
  TitikCorouselBloc() : super(0);

  @override
  Stream<int> mapEventToState(TitikCorouselEvent event) async* {
    if (event is TitikCorousel) initstates = event.index;
    yield initstates!;
  }
}
