LazyBuilder constructor

const LazyBuilder({
  1. Key? key,
  2. required Widget child,
  3. LazyWidgetBuilder? builder,
  4. LazyOnErrorWidgetBuilder? onError,
  5. bool? forceTry,
  6. bool emptyOnError = false,
  7. BoxConstraints? constraints,
  8. bool preventRedundantRebuilds = false,
})

This can be used to build a Widget lazily, such that, we can get the RenderBox for the Widget then build another widget accordingly.

Implementation

const LazyBuilder({
  Key? key,
  required this.child,
  this.builder,
  this.onError,
  this.forceTry,
  this.emptyOnError = false,
  this.constraints,
  this.preventRedundantRebuilds = false,
}) : super(key: key);