import 'dart:async';

import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';
import 'package:farm_tpf/custom_model/Media.dart';
import 'package:meta/meta.dart';

part 'media_helper_event.dart';
part 'media_helper_state.dart';

class MediaHelperBloc extends Bloc<MediaHelperEvent, MediaHelperState> {
  MediaHelperBloc() : super(MediaHelperInitial());

  @override
  Stream<MediaHelperState> mapEventToState(
    MediaHelperEvent event,
  ) async* {
    if (event is ChangeListMedia) {
      yield MediaHelperSuccess(items: event.items);
    }
  }
}
