refresh method Null safety

Future<Supporter?> refresh(
  1. {required String supporterId}
)

Retrieves the current supporter instance from the backend and publishes it. Returns the Supporter instance on success or null on error.

Implementation

Future<Supporter?> refresh({required final String supporterId}) async {
  final supporter = await getSupporter(supporterId: supporterId);

  _sendSupporterUpdate(supporter: supporter);

  return supporter;
}