set_state_async 0.1.2 copy "set_state_async: ^0.1.2" to clipboard
set_state_async: ^0.1.2 copied to clipboard

retracted

A mixin for avoiding State.setState during build or locking issue and improving performance.

About #

SetStateAsync is a mixin that defers multiple setState calls into one within the same event loop.

This approach helps reduce overhead when calling setState multiple times in quick succession, preventing setState() or markNeedsBuild() called during build or setState() or markNeedsBuild() called when widget tree was locked issue and improving performance.

Installation #

  1. Run flutter pub add set_state_async to add this package to your project.
  2. Add import 'package:set_state_async/set_state_async.dart'; to your dart file.
  3. Add with SetStateAsync to your State class.

Usage #

Just call setStateAsync instead of setState. An optional callback can be passed if you need to perform changes just before rebuilding the widget.

For more information, please check example or API reference.

0
likes
0
points
346
downloads

Publisher

unverified uploader

Weekly Downloads

A mixin for avoiding State.setState during build or locking issue and improving performance.

Repository (GitHub)
View/report issues

Topics

#set-state #async #state #performance #optimization

License

unknown (license)

Dependencies

flutter

More

Packages that depend on set_state_async