lazy static method

WidgetPlaceholder lazy(
  1. Widget child, {
  2. String? debugLabel,
})

Creates a placeholder lazily.

Returns child if it is already a placeholder.

Implementation

// ignore: prefer_constructors_over_static_methods
static WidgetPlaceholder lazy(Widget child, {String? debugLabel}) =>
    child is WidgetPlaceholder
        ? child
        : WidgetPlaceholder(debugLabel: debugLabel, child: child);