import 'package:flutter/widgets.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pharmacy_mobile/blocs/language/language_bloc.dart';
import 'package:pharmacy_mobile/blocs/language/language_event.dart';

Future<String> blocGetLanguage(BuildContext context) async {
  try {
    final languageBloc = context.read<LanguageBloc>();
    languageBloc.add(LanguageGetValue());
    return languageBloc.state.value;
  } catch (e) {
    return '';
  }
}
