rebirth 1.0.2 copy "rebirth: ^1.0.2" to clipboard
rebirth: ^1.0.2 copied to clipboard

For Rebirth/Restart of your app.

Features #

A Flutter Package for give a rebirth of your app

Installation #

Dependency #

Add the package as a dependency in your pubspec.yaml file.

dependencies:
  rebirth: "^lastest_version"

Import #

Import the package in your code file.

import 'package:rebirth/rebirth.dart';

Getting started #

Just wrap the WidgetRebirth widget to your MaterialApp or CupertinoApp and use the method WidgetRebirth.createRebirth for magic

Usage #

To use this plugin, add rebirth: ^

void main() {
  runApp(const WidgetRebirth(materialApp: MyApp()));
}

class Screen1 extends StatelessWidget {
  const Screen1({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Screen 1'),
      ),
      body: Center(
        child: TextButton(
          onPressed: () => restartApp(context: context),
          child: const Text("Restart your app"),
        ),
      ),
    );
  }

  void restartApp({required BuildContext context}) {
    WidgetRebirth.createRebirth(context: context);
  }
}

Flutter 2.0 and null-safety #

From 1.0.0 and onwards, Flutter Rebirth is null-safe and requires Dart SDK 2.12.0 minimum.

License #

Flutter Rebirth is released under the MIT License

12
likes
140
points
459
downloads

Publisher

unverified uploader

Weekly Downloads

For Rebirth/Restart of your app.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on rebirth