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<bool> blocSetUser(BuildContext context, String value) async {
  try {
    final userBloc = context.read<UserBloc>();
    userBloc.add(UserSetValue(value));
    return true;
  } catch (e) {
    return false;
  }
}
