init method
Initialize Purchases lib of RevenueCat, must be called before runApp().
For example:
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await getIt<RevCatIapService>().init();
runApp(App());
}
Implementation
Future<void> init() async {
await Purchases.setDebugLogsEnabled(enabledLogs);
await Purchases.setup(publicKey, appUserId: appUserId);
}