// text_bloc.dart
import 'package:flutter_bloc/flutter_bloc.dart';

import 'text_event.dart';
import 'text_state.dart';

class TextLanguageBloc extends Bloc<TextEvent, TextState> {
  TextLanguageBloc() : super(const TextState()) {
    on<ButtonPressed>(_onButtonPressed);
  }

  void _onButtonPressed(ButtonPressed event, Emitter<TextState> emit) {
    emit(TextState(text: event.newText));
  }
}
