0 purchases
trial manager
Trial Manager #
Trial Manager is a Flutter package that facilitates managing trial periods and handling expiration screens using Lottie animations.
Features #
Trial Period Management: Easily integrate trial period management into your Flutter applications.
Expiration Screens: Automatically handle screens that inform users when their trial period expires.
Installation #
To use this package, add trial_manager as a dependency in your pubspec.yaml file.
dependencies:
trial_manager: latest version
copied to clipboard
Then, import the package in your Dart code:
import 'package:trial_manager/trial_manager.dart';
copied to clipboard
Usage
Initialize Trial Manager
Initialize the Trial Manager in your application to start managing trial periods:
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await TrialManager.initialize();
final trialExpired = await TrialManager.isTrialExpired(trialPeriodDays: 12); // 30 days by default
runApp(MyApp());
}
copied to clipboard
Show an expiration screen when the trial period ends:
if(trialExpired){
return MaterialApp(
home: TrialManager.getExpirationScreen(type: ExpirationScreenType.type1 ), // default screen tyep1
);
}
copied to clipboard
Example
For a complete example, refer to the example directory in this repository.
Authors #
@rakibullhaque
Support #
For support, email [email protected] or join our Slack channel.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.