global_refresh

Last updated:

0 purchases

global_refresh Image
global_refresh Images
Add to Cart

Description:

global refresh

Global Refresh #
Basic library for refreshing the main state of an application. Useful when doing styling or language changes.
Usage #
Use the GRState instead of State:
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});

final String title;

@override
State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends GRState<MyHomePage> { // <-- use GRState
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: ..
);
}
}
copied to clipboard
Then for refresh the main state:
GlobalRefresh().refresh();
copied to clipboard

License:

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

Files In This Product:

Customer Reviews

There are no reviews.