save method

Future<void> save()

Sets the enabled and amount to the MonetizationSettings.

Implementation

Future<void> save() async {
  try {
    await _partnerService.updateMonetizationSettings(
      userId: userId,
      donationsEnabled: enabled.value,
      donationsMinimum: Sum(amount.value ?? 1),
    );
  } catch (e) {
    MessagePopup.error(e);
    rethrow;
  }
}