ImagePinPointContainer class
A widget that displays an image and allows adding pins/markers at specific points
This widget provides functionality to:
- Display an image from network or file source
- Show pins at specific coordinates on the image
- Add new pins by tapping on the image after selecting a pin style
- Maintain proper aspect ratio of the original image
- Notify parent widgets when pins are added or changed
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ImagePinPointContainer
Constructors
-
ImagePinPointContainer({Key? key, List<
Pinner> pinsOnTheImage = const [], required String imageSource, Pinner? selectedPinStyle, void onPinsUpdated(List<Pinner> pins)?, required GlobalKey<State< imagePinPointKey, void onFirstLoadCompleted()?, void onPinsEditingComplete(List<StatefulWidget> >Pinner> pins)?, void onInit()?}) -
Creates an image container that supports pin placement
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
imagePinPointKey
→ GlobalKey<
State< StatefulWidget> > -
Key used for capturing the widget state as an image
This is required for the image saving functionality
final
- imageSource → String
-
Source file path/URL of the image to display
Can be either a network URL or a local file path
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onFirstLoadCompleted → void Function()?
-
Callback triggered when the widget is first loaded
This is useful for initializing data or triggering actions when the widget appears
final
- onInit → void Function()?
-
Callback triggered when the widget is initialized
Useful for setup operations that need to happen at widget creation
final
-
onPinsEditingComplete
→ void Function(List<
Pinner> pins)? -
Callback triggered when the user finishes adding pins to the image
final
-
onPinsUpdated
→ void Function(List<
Pinner> pins)? -
Callback triggered when pins are added/modified
Provides the updated list of all pins on the image
final
-
pinsOnTheImage
→ List<
Pinner> -
List of pins to display on the image
These pins will be shown when the widget loads
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedPinStyle → Pinner?
-
Currently selected pin style and properties
When set, defines the appearance of new pins added to the image
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ImagePinPointContainer> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited