rebirth

Creator: coderz1093

Last updated:

Add to Cart

Description:

rebirth

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"
copied to clipboard
Import #
Import the package in your code file.
import 'package:rebirth/rebirth.dart';
copied to clipboard
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);
}
}

copied to clipboard
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

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.