Skip to content

Simple widget to restart your flutter application.

License

Notifications You must be signed in to change notification settings

GroovinChip/flutter_restart

 
 

Repository files navigation

flutter_restart

Simple widget to restart your flutter application.

Steps to use

  • Add RestartWidget at the root of your widget tree.
import 'package:flutter/material.dart';
import 'package:flutter_restart/flutter_restart.dart';

void main() {
  runApp(
    RestartWidget(
      child: MyApp(),
    ),
  );
}
  • From anywhere inside your application call restartApp.
RestartWidget.of(context).restartApp();

Internals

RestartWidget is an InheritedWidget that provides the restartApp function, which when called rebuilds the entire widget tree.

Attribution

Package built from Rémi Rousselet's answer on StackOverflow.

About

Simple widget to restart your flutter application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 67.5%
  • Java 17.9%
  • Objective-C 14.6%