of static method

Use this method to get the current UsersBlocState instance

Implementation

static UsersBlocState of(BuildContext context) {
  UsersBlocState? state;

  state = context.findAncestorStateOfType<UsersBlocState>();

  assert(
    state != null,
    'You must have a UsersBloc widget as ancestor',
  );

  return state!;
}