getSnapshot abstract method

Future<TargetedWidgetSnapshot?> getSnapshot(
  1. Offset location,
  2. Object key,
  3. ValueGetter<Widget?> widgetBuilder
)

Returns snapshot for given location and key. If widget is already registered for the key, the snapshot will be provided immediately. Otherwise the widgetBuilder will be called to create the widget and snapshot will be provided as soon as the widget is laid out.

If widgetBuilder returns null or null widget is registered for given key, the default child widget will be used as snapshot.

Implementation

Future<TargetedWidgetSnapshot?> getSnapshot(
  Offset location,
  Object key,
  ValueGetter<Widget?> widgetBuilder,
);