global_refresh 1.0.0 copy "global_refresh: ^1.0.0" to clipboard
global_refresh: ^1.0.0 copied to clipboard

Simple library for refreshing the main state of an application

pub package

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: ..
    );
  }
}

Then for refresh the main state:

GlobalRefresh().refresh();
2
likes
150
points
117
downloads

Publisher

verified publisherlandamessenger.com

Weekly Downloads

Simple library for refreshing the main state of an application

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on global_refresh