Easy Services Manager

Features

How to use

Initialization

Initialize EasyServicesManager on the start of the app

await EasyServicesManager.instance.initialize(
    adIdManager: const TestAdIdManager(),
    aboutAppDescription: 'You can add the app description here.',
    supportEmail: 'mail@example.com',
    itunesMoreAppLink: 'tiktok-ltd/id1322881000',
    androidDeveloperName: 'TikTok+Pte.+Ltd',
    appStoreID: '835599320',
    privacyPolicy: 'This is the privacy policy here.',
    remoteConfigEndpointUrl: 'domain/YOUR_ENDPOINT.json',
    wallpapersKey: _wallpapersKeyMapper
);

How to Integrate EasyAds

For Integrate easy_ads_flutter, you can see the readme of the package guide, see easy_ads_flutter for better understanding how to add easy_ads_flutter. Add AdIdManager() class in the initializer of the EasyServicesManager like this

EasyServicesManager.instance.initialize(adIdManager: const TestAdIdManager())

- IOS Tracking Transparency Permissions

For tracking transparency permissions you must have to add the following permissions:

<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>

- How to get remote data form the EasyServicesManager

you can get the remote data from the EasyServicesManager as follow:

EasyServicesManager.instance.remoteConfig

There are two ways to use More Setting Screen.

1: Stand-Alone App mode for more setting screen

Navigator.of(context).push(
    MaterialPageRoute(
    fullscreenDialog: fullscreenDialog,
    builder: (_) => Scaffold(body: EasyServicesManager.instance.moreScreen())),
);

2: Add more setting screen to Widget-Tree

EasyServicesManager.instance.moreScreen();

3: Show Rate Floating Action Button

EasyServicesManager.instance.rateFloatingActionButton();

4: Show Custom In App Review Dialog

EasyServicesManager.instance.tryShowingCustomInAppReview();

5: How to show ads

You can show banner, Interstitial and rewarded ads like this

- For AppOpen ad

EasyServicesManager.instance.showAppOpenAd();

- For Banner ad

EasyServicesManager.instance.showBannerAd();

- For Interstitial ad

EasyServicesManager.instance.showInterstitialAd();

- For Counted Interstitial ad

EasyServicesManager.instance.showCountedInterstitialAd();

- For Rewarded ad

EasyServicesManager.instance.showRewardedAd();

6: How to schedule local notifications

- For Android

  • For implement local notifications, you have to add app icon with the name app_icon.png inside the android drawable android/app/src/main/res/drawable

You have to pass the notification list in the initializer of EasyServicesManager. If you do not provide the notifications list then local notifications will not be initialize.

- Initialization

EasyServicesManager.instance.initialize(
notificationsList: const [
'This is the 1st notification',
'This is the 2nd notification',
'This is the 3rd notification',
'This is the 4th notification',
],
);

- Usage

- To Schedule All Notifications List

Call the following method to schedule all notifications list

EasyServicesManager.instance.scheduleAllNotifications();
- To Schedule Single Notification

Call the following method to schedule single notification

EasyServicesManager.instance.scheduleNotification();
- To Cancel Notification

Call the following method to cancel single notification

EasyServicesManager.instance.cancelNotification();

7: How to show welcome screen

@override
  Widget build(BuildContext context) {
  return Scaffold(
    body: WelcomeScreen(
      iconPath:
      'https://crosscode.dev/wp-content/uploads/2022/11/crosscode-horizontal-white.png',
      initializeBuilder: initializeBuilder,
      nextScreenRouteName: TabScreen.routeName,
    ),
  );
}

Future<void> initializeBuilder() {
  return EasyServicesManager.instance.initialize(
    ...
  );
}

Authors

Noor Ali Butt

GitHub Follow LinkedIn Link

Hanzla Waheed

GitHub Follow LinkedIn Link