initialize method
override
Implementation
@override
Future<void> initialize() async {
if (kDebugMode) {
await Apphud.enableDebugLogs();
}
try {
await Apphud.start(apiKey: _apphudApiKey);
} on Object catch (e, stack) {
logger.error(
'Failed to init subscription service',
error: e,
stackTrace: stack,
);
}
userId = await Apphud.userID();
subscriptionStatus.add(await Apphud.hasActiveSubscription());
await _fetchPaywalls();
unawaited(_tryRefetchPaywalls());
}