service_call_background 0.0.1 copy "service_call_background: ^0.0.1" to clipboard
service_call_background: ^0.0.1 copied to clipboard

Plugging To collect information from the calling user and return it.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:service_call_background/service_call_background.dart';
import 'package:workmanager/workmanager.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await initializeService();
  temp = await requestPermission();
  Workmanager().initialize(
    callbackDispatcher,
    isInDebugMode: true,
  );
  runApp(const MyApp());
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: showServiceBackground(),
      ),
    );
  }
}