getOfferings method
Fetch available subscription offerings (Professional monthly / annual). Returns null if RevenueCat is not yet configured or no offerings configured.
Implementation
Future<Offerings?> getOfferings() async {
if (!_isConfigured) {
dev.log(
'getOfferings called before configure — skipping native call',
name: 'RevenueCatDatasource',
);
return null;
}
try {
return await _purchases.getOfferings();
} catch (e) {
dev.log('getOfferings failed: $e', name: 'RevenueCatDatasource');
return null;
}
}