easy_service_manager 1.3.2 copy "easy_service_manager: ^1.3.2" to clipboard
easy_service_manager: ^1.3.2 copied to clipboard

PlatformiOS

This Package is used to add post production settings and features like more app settings, in-app-review, app rating system etc.

example/lib/main.dart

import 'package:easy_service_manager/easy_service_manager.dart';
import 'package:flutter/material.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData.dark(useMaterial3: true),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: WelcomeWidget(
        iconPath:
            'https://crosscode.dev/wp-content/uploads/2022/11/crosscode-horizontal-white.png',
        initializeBuilder: initializeBuilder,
        onDone: () => onPressedStandalone(false),
      ),
      floatingActionButton: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          EasyServicesManager.instance.rateFloatingActionButton() ??
              const SizedBox(),
          FloatingActionButton(
            heroTag: "onFullScreenPressedStandalone",
            onPressed: () => onPressedStandalone(true),
            child: const Icon(Icons.launch),
          ),
          FloatingActionButton(
            heroTag: "onPressedStandalone",
            onPressed: () => onPressedStandalone(false),
            child: const Icon(Icons.push_pin),
          )
        ],
      ),
      floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
    );
  }

  static Widget getMoreSettings() {
    return EasyServicesManager.instance.moreScreen();
  }

  void onPressedStandalone(bool fullscreenDialog) {
    Navigator.of(context).push(
      MaterialPageRoute(
          fullscreenDialog: fullscreenDialog,
          builder: (_) => Scaffold(body: getMoreSettings())),
    );
  }

  Future<void> initializeBuilder() {
    return EasyServicesManager.instance.initialize(
      adIdManager: const TestAdIdManager(),
      aboutAppDescription: 'You can add the app description here.',
      supportEmail: '[email protected]',
      itunesMoreAppLink: 'tiktok-ltd/id1322881000',
      androidDeveloperName: 'TikTok+Pte.+Ltd',
      appStoreID: '835599320',
      privacyPolicy: 'This is the privacy policy here.',
      remoteConfigEndpointUrl: 'nooralibutt.github.io/sample.json',
      wallpapersKey: _wallpapersKeyMapper,
      useNotifications: true,
      isAutoScheduleNotification: true,
      notificationsList: const [
        'This is the 1st notification',
        'This is the 2nd notification',
        'This is the 3rd notification',
        'This is the 4th notification',
      ],
    );
  }
}

String _wallpapersKeyMapper(bool isAndroidApproving, bool isIosApproving) {
  if (isAndroidApproving || isIosApproving) return 'approving_wallpapers';
  return 'wallpapers';
}
6
likes
120
pub points
66%
popularity

Publisher

verified publishernooralibutt.com

This Package is used to add post production settings and features like more app settings, in-app-review, app rating system etc.

Homepage

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

app_tracking_transparency, easy_ads_flutter, flutter, flutter_local_notifications, http, in_app_review, loading_indicator, package_info_plus, share_plus, shared_preferences, timezone, unity_ads_plugin, url_launcher

More

Packages that depend on easy_service_manager