getUpdates<R> method

Future<void> getUpdates<R>([
  1. R? source(
    1. R parent
    )?
])

Implementation

Future<void> getUpdates<R>([
  R? Function(R parent)? source,
]) async {
  emit(state.copy(isLoading: true));
  try {
    var result = await handler.getUpdates(source);
    emit(state.copy(result: result.result));
  } catch (_) {
    emit(state.copy(error: "Something went wrong!"));
  }
}