CalloutWidgetBuilder typedef

CalloutWidgetBuilder = Widget Function(BuildContext context, GeoElement? geoElement)

Signature for rendering custom callout content.

The returned widget is laid out using the active CalloutStyle width constraints before the callout is shown. When CalloutStyle.autoAdjustWidth is true, the widget is measured between CalloutStyle.minWidth and CalloutStyle.maxWidth. When it is false, the widget is measured at a fixed width of CalloutStyle.maxWidth.

For example, a SizedBox(width: 200) with CalloutStyle(maxWidth: 100) is measured at 100 logical pixels wide.

The geoElement argument is non-null only when used from Callout.showCalloutForGeoElement.

For Callout.showAt and Callout.showForLocationDisplay, geoElement is always null.