showForLocationDisplay method

bool showForLocationDisplay({
  1. String? title,
  2. String? detail,
  3. CalloutStyle? style,
  4. LeaderPosition leaderPosition = .auto,
  5. bool animated = true,
  6. CalloutWidgetBuilder? contentBuilder,
})

Shows the callout at the current location display position.

The title and detail parameters are optional. When omitted, the current Callout.title and Callout.detail values are used.

The contentBuilder parameter is optional and renders custom widget content. When omitted, the current Callout.contentBuilder value is used. It cannot be used together with title or detail.

For showForLocationDisplay, the geoElement parameter passed to contentBuilder is always null.

Throws an ArgumentError if contentBuilder is provided together with title and/or detail.

If the resolved title and detail are both empty strings, the callout is still shown, but no text lines are rendered.

The style parameter is optional. When omitted, the current Callout.style value is used.

The leaderPosition parameter is optional and controls where the leader is placed on the callout.

The animated parameter is optional and defaults to true.

Returns true when the callout is shown, or false when the current location is unavailable or placement fails.