restart_app 1.0.3
restart_app: ^1.0.3 copied to clipboard
A simple package that helps you to restart the whole android app with a single function call.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:restart_app/restart_app.dart';
void main() {
runApp(ExampleApp());
}
class ExampleApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Restart App Example'),
),
body: Center(
child: TextButton(
child: Text('Restart!'),
onPressed: () {
Restart.restartApp();
},
),
),
),
);
}
}