make_app_endless_plugin 0.0.4 icon indicating copy to clipboard operation
make_app_endless_plugin: ^0.0.4 copied to clipboard

PlatformAndroid

A flutter plugin for running your flutter appplication even if it is removed from background and keeing all of your other plugin alive and active..

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:make_app_endless_plugin/make_app_endless_plugin.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  MakeAppEndlessPlugin plugin;

  @override
  void initState() {
    super.initState();
    plugin = MakeAppEndlessPlugin();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
            child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
              RaisedButton(
                child: const Text('Make Endless'),
                onPressed: () async {
                  await plugin.extendLifeCycle(
                      "mke App Endless", // Notification Channel Name
                      null, // Notification Channel Description
                      "Title", // Notification Content title
                      "No description required"); // Notification Content description
                },
              ),
              RaisedButton(
                child: const Text('Stop'),
                onPressed: () async {
                  await plugin.stopLifeCycleExtension();
                },
              )
            ])),
      ),
    );
  }
}
5
likes
120
pub points
0%
popularity

Publisher

unverified uploader

A flutter plugin for running your flutter appplication even if it is removed from background and keeing all of your other plugin alive and active..

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on make_app_endless_plugin