lazy method Null safety

WidgetPlaceholder lazy(
  1. Widget child
)

Creates a placeholder lazily.

Returns child if it is already a placeholder.

Implementation

static WidgetPlaceholder lazy(Widget child) => child is WidgetPlaceholder
    ? child
    : WidgetPlaceholder<Widget>(child, child: child);