FocalPoint class
The FocalPoint class defines a screen point to align a marker on the map during a focus event. It uses a combination of a normalized coordinate ratio and a pixel offset to determine the marker's final position on the map widget.
Constructors
- FocalPoint.new({Offset ratio = Offset.zero, Offset offset = Offset.zero})
-
Constructs a FocalPoint with an optional
ratio
andoffset
, both defaulting to the origin point if not provided.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- offset → Offset
-
The pixel-based offset is applied after the ratio calculation to
fine-tune the marker's position. This allows for precise adjustments to
the marker's screen location, accommodating for elements such as map
controls or overlays that may otherwise obscure the marker.
final
- ratio → Offset
-
The normalized coordinate ratio for aligning the marker within the map
widget. This point follows a normalized coordinate system where:
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
project(
Size size) → Offset -
Projects the FocalPoint onto the map widget given its
size
. The resulting Offset represents the absolute pixel coordinates on the map widget where the marker should be aligned. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited