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

Freeze renders by showing an image instead of the rendered widget to reduce element tree counts

Freeze renders by showing an image instead of the rendered widget to reduce element tree counts

Features #

This freeze widget simply snapshots the child whenever the widget changes to prevent the flutter (web) framerate from getting low even when not redrawing the actual child widget.

Usage #

class SomeScreen extends StatefulWidget {
  const SomeScreen({Key? key}) : super(key: key);

  @override
  State<SomeScreen> createState() => _SomeScreenState();
}

class _SomeScreenState extends State<SomeScreen> {
  SomeComplexStateInfo stateInfo;

  @override
  Widget build(BuildContext context)=> Scaffold(
    body: Center(
      child: Freeze(
        builder: (context) => AVeryComplexWidget(stateInfo),
      ),
    ),
  );
}
9
likes
120
pub points
77%
popularity

Publisher

verified publisherarcane.art

Freeze renders by showing an image instead of the rendered widget to reduce element tree counts

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on freeze