saveOfferings static method

Future<void> saveOfferings({
  1. required OfferingsModel? offerings,
})

Implementation

static Future<void> saveOfferings(
    {required OfferingsModel? offerings}) async {
  try {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    await prefs.setString('offerings', jsonEncode(offerings?.toJson()));
  } catch (e) {
    SdkLogger.error('Inappify storage write failed: ${e.runtimeType}');
  }
}