

import 'package:absenkuv3/Repository/Model/mShiftTeman.dart';
import 'package:bloc/bloc.dart';

abstract class PilihShiftEvent {
  Datum? dataShift;
}

class SetShift extends PilihShiftEvent {
  SetShift(Datum _dataShift) {
    dataShift = _dataShift;
  }
}

class DataShiftProgress extends Datum{}

class PilihShiftBloc extends Bloc<PilihShiftEvent, Datum> {
  Datum? init;
  PilihShiftBloc(init) : super(init);

  @override
  Stream<Datum> mapEventToState(PilihShiftEvent event) async* {
    if (event is SetShift) {
      print(event.dataShift!.namaShift);
      yield event.dataShift!;
    } else
      yield init!;
  }
}
