tp_package 1.0.7
tp_package: ^1.0.7 copied to clipboard
tp package
Features #
- Load banner ad faster.
- Optimize load interstitial ad singleton.
- Make utils toast, connectivity, alert dialog, text field, tile row.
- Make flutter share, send mail, compose call in a single package.
Getting started #
dependencies:
tp_package: ^latest_version
Usage #
Init ad in main function before implement show ad:
const testDeviceIds = <String>['iOS device id to show ads'];
TpAdManager.init(testDeviceIds)
Show banner ad:
TpBannerAd('banner ad unit id')
Load interstitial ad:
TpInterstitialAd.load('interstitial ad unit id');
Show interstitial ad:
TpInterstitialAd.show(onDismissAd: yourFunction);
Dispose interstitial ad:
TpInterstitialAd.dispose();
Request permission:
Future<PermissionResult> TpPermission.request(yourPermission);
Get External storage:
iOS #
Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist:
NSPhotoLibraryUsageDescription- describe why your app needs permission for the photo library. This is called Privacy - Photo Library Usage Description in the visual editor.
Android #
android.permission.WRITE_EXTERNAL_STORAGE- Permission for usage of external storage
Future<StorageStatus> TpPermission.getStorageDirectory(context);
Init material app with responsive for tablet, pc:
MaterialApp(
builder: TpMaterialApp.builder,
);