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

Native restart implementation solution for Flutter applications.

example/lib/main.dart

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

import 'package:flutter_native_reboot/flutter_native_reboot.dart';

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

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

class _MyAppState extends State<MyApp> {


  Future<void> reboot() async {
    await FlutterNativeReboot.reboot();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: FlatButton(
            child: Text('Reboot'),
            onPressed: reboot,
          ),
        ),
      ),
    );
  }
}
1
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Native restart implementation solution for Flutter applications.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_native_reboot