trial_manager 0.0.2 copy "trial_manager: ^0.0.2" to clipboard
trial_manager: ^0.0.2 copied to clipboard

The trial_manager package for Flutter provides utilities to manage trial periods within applications.

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

Then, import the package in your Dart code:

import 'package:trial_manager/trial_manager.dart';

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());
}

Show an expiration screen when the trial period ends:


 if(trialExpired){
      return  MaterialApp(
        home: TrialManager.getExpirationScreen(type: ExpirationScreenType.type1 ), // default screen tyep1
      );
    }

Example For a complete example, refer to the example directory in this repository.

Authors #

Support #

For support, email rakibullhaques@gmail.com or join our Slack channel.

3
likes
140
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

The trial_manager package for Flutter provides utilities to manage trial periods within applications.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, lottie, shared_preferences

More

Packages that depend on trial_manager