make_app_endless_plugin 0.0.4 copy "make_app_endless_plugin: ^0.0.4" to clipboard
make_app_endless_plugin: ^0.0.4 copied to clipboard

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();
                },
              )
            ])),
      ),
    );
  }
}
4
likes
40
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

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)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on make_app_endless_plugin