import 'dart:async';
import 'dart:ui';

import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';

part 'lang_event.dart';
part 'lang_state.dart';

class LangBloc extends Bloc<LangEvent, LangState> {
  LangBloc() : super(LangLoading()) {
    on<LanguageEvent>(_setLocale);
  }

  void _setLocale(LanguageEvent event, Emitter emit){
    emit(LangLoading());
    emit(LangSuccess(locale: event.locale));
  }
}
