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

A Flutter plugin for restarting Android and iOS applications.

example/lib/main.dart

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

void main() {
  print('app start');
  runApp(MyApp());
}

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

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

class _MyAppState extends State<MyApp> {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: MaterialButton(
            onPressed: () async {
              final result = await FlutterRestartPlus().restartApp(
                iosNotificationTitle: 'Restart completed',
                iosNotificationContent: 'Tap to open the app'
              );
            },
            color: Colors.blueAccent,
            child: Padding(
              padding: const EdgeInsets.all(16.0),
              child: Text(
                'Click me',
                style: TextStyle(
                    color: Colors.white,
                    fontSize: 35.0
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}
0
likes
150
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for restarting Android and iOS applications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_restart_plus

Packages that implement flutter_restart_plus