unsubscribe method
Unsubscribes from current subscription asynchronously Sets loading state and invokes the provider method
Implementation
Future<void> unsubscribe({
String? orgId,
}) async {
emit(state.startLoading(BillingLoadingStates.unsubscribe));
try {
return await provider.unsubscribe(
orgId: orgId,
);
} catch (error, stackTrace) {
emit(state.addMessage(
Message.error(_localizations.unknownError),
error,
stackTrace,
));
rethrow;
} finally {
emit(state.endLoading(BillingLoadingStates.unsubscribe));
}
}