app_paywall 0.0.1
app_paywall: ^0.0.1 copied to clipboard
A Flutter package to integrate a RevenueCat paywall with fallback offers.
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:app_paywall/app_paywall.dart'; // import your package
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return GetMaterialApp(
debugShowCheckedModeBanner: false,
home: PaywallPage(
primaryColor: Colors.blue, // optional, defaults if null
surface: Colors.grey.shade200, // optional
onSurface: Colors.black, // optional
productIds: ["yearly_plan", "monthly_plan", "weekly_plan"],
appleApiKey: "your_apple_api_key",
googleApiKey: "your_google_api_key",
entitlementID: "pro_entitlement",
),
initialBinding: BindingsBuilder(() {
// Put the controller without parameters
Get.put(PaywallController());
}),
);
}
}