import 'package:bloc/bloc.dart';
import 'package:flutter/material.dart';

import 'lng_event.dart';
import 'lng_state.dart';

class LocalizationBloc extends Bloc<LocalizationEvent, LocalizationState> {
  LocalizationBloc() : super(const LocalizationState(Locale('en'))) {
    on<ChangeLanguage>((event, emit) {
      emit(LocalizationState(event.locale));
    });
  }
}
