AppRestarter constructor

const AppRestarter({
  1. Key? key,
  2. Widget? child,
  3. WidgetBuilder? builder,
  4. Future<void> onRestart()?,
})

Creates an AppRestarter with a static child.

Use builder instead when the subtree must be re-created from scratch on every restart (e.g. when it holds references to re-created objects).

Implementation

const AppRestarter({
  super.key,
  this.child,
  this.builder,
  this.onRestart,
}) : assert(
        child != null || builder != null,
        'AppRestarter requires either child or builder.',
      );