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

outdated

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

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on make_app_endless_plugin