import 'package:flutter/widgets.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pharmacy_mobile/blocs/user/user_bloc.dart';
import 'package:pharmacy_mobile/blocs/user/user_event.dart';

Future<String> blocGetUser(BuildContext context) async {
  try {
    final userBloc = context.read<UserBloc>();
    userBloc.add(UserGetValue());
    return userBloc.state.value;
  } catch (e) {
    return '';
  }
}
