ClickableImage class
A clickable image wrapped inside GestureDetector
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ClickableImage
Constructors
-
ClickableImage({Key? key, required ClickableImageType clickableImageType, ImageProvider<
Object> ? image, File? file, String? src, String? name, Uint8List? bytes, double? width, double? height, BoxFit? fit, int? cacheWidth, int? cacheHeight, AssetBundle? bundle, String? package, ImageLoadingBuilder? loadingBuilder, Rect? centerSlice, Color? color, ImageErrorWidgetBuilder? errorBuilder, BlendMode? colorBlendMode, ImageFrameBuilder? frameBuilder, Animation<double> ? opacity, String? semanticLabel, Map<String, String> ? headers, double scale = 1.0, AlignmentGeometry alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat, bool isAntiAlias = false, bool excludeFromSemantics = false, bool gaplessPlayback = false, bool matchTextDirection = false, FilterQuality filterQuality = FilterQuality.low, GestureTapCallback? onTap, GestureTapUpCallback? onTapUp, GestureTapDownCallback? onTapDown, GestureTapCancelCallback? onTapCancel, GestureTapCallback? onDoubleTap, GestureTapDownCallback? onDoubleTapDown, GestureTapCancelCallback? onDoubleTapCancel, GestureLongPressCallback? onLongPress, GestureLongPressDownCallback? onLongPressDown, GestureLongPressCancelCallback? onLongPressCancel, GestureLongPressStartCallback? onLongPressStart, GestureLongPressUpCallback? onLongPressUp, GestureLongPressEndCallback? onLongPressEnd, GestureLongPressMoveUpdateCallback? onLongPressMoveUpdate}) -
const
Properties
- alignment → AlignmentGeometry
-
How to align the image within its bounds.
final
- bundle → AssetBundle?
-
final
- bytes → Uint8List?
-
bytes is used to create Image.memory()
bytes should not be null if clickableImageType is ClickableImageType.memory
final
- cacheHeight → int?
-
final
- cacheWidth → int?
-
final
- centerSlice → Rect?
-
The center slice for a nine-patch image.
final
- clickableImageType → ClickableImageType
-
final
- color → Color?
-
If non-null, this color is blended with each image pixel using colorBlendMode.
final
- colorBlendMode → BlendMode?
-
Used to combine color with this image.
final
- errorBuilder → ImageErrorWidgetBuilder?
-
A builder function that is called if an error occurs during image loading.
final
- excludeFromSemantics → bool
-
Whether to exclude this image from semantics.
final
- file → File?
-
file is used to create Image.file()
it should not be null if clickableImageType is ClickableImageType.file
final
- filterQuality → FilterQuality
-
The rendering quality of the image.
final
- fit → BoxFit?
-
How to inscribe the image into the space allocated during layout.
final
- frameBuilder → ImageFrameBuilder?
-
final
- gaplessPlayback → bool
-
Whether to continue showing the old image (true), or briefly show nothing
(false), when the image provider changes. The default value is false.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> ? -
Whether to paint the image with anti-aliasing.
final
- height → double?
-
If non-null, require the image to have this height.
final
-
image
→ ImageProvider<
Object> ? -
final
- isAntiAlias → bool
-
Whether to paint the image with anti-aliasing.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingBuilder → ImageLoadingBuilder?
-
A builder that specifies the widget to display to the user while an image
is still loading.
final
- matchTextDirection → bool
-
Whether to paint the image in the direction of the TextDirection.
final
- name → String?
-
name is used to create Image.asset()
it should not be null if clickableImageType is ClickableImageType.asset
final
- onDoubleTap → GestureTapCallback?
-
The user has tapped the screen with a primary button at the same location
twice in quick succession.
final
- onDoubleTapCancel → GestureTapCancelCallback?
-
The pointer that previously triggered onDoubleTapDown will not end up
causing a double tap.
final
- onDoubleTapDown → GestureTapDownCallback?
-
A pointer that might cause a double tap has contacted the screen at a
particular location.
final
- onLongPress → GestureLongPressCallback?
-
Called when a long press gesture with a primary button has been recognized.
final
- onLongPressCancel → GestureLongPressCancelCallback?
-
A pointer that previously triggered onLongPressDown will not end up
causing a long-press.
final
- onLongPressDown → GestureLongPressDownCallback?
-
The pointer has contacted the screen with a primary button, which might
be the start of a long-press.
final
- onLongPressEnd → GestureLongPressEndCallback?
-
A pointer that has triggered a long-press with a primary button has
stopped contacting the screen.
final
- onLongPressMoveUpdate → GestureLongPressMoveUpdateCallback?
-
A pointer has been drag-moved after a long-press with a primary button.
final
- onLongPressStart → GestureLongPressStartCallback?
-
Called when a long press gesture with a primary button has been recognized.
final
- onLongPressUp → GestureLongPressUpCallback?
-
A pointer that has triggered a long-press with a primary button has
stopped contacting the screen.
final
- onTap → GestureTapCallback?
-
A tap with a primary button has occurred.
final
- onTapCancel → GestureTapCancelCallback?
-
The pointer that previously triggered onTapDown will not end up causing
a tap.
final
- onTapDown → GestureTapDownCallback?
-
A pointer that might cause a tap with a primary button has contacted the
screen at a particular location.
final
- onTapUp → GestureTapUpCallback?
-
A pointer that will trigger a tap with a primary button has stopped
contacting the screen at a particular location.
final
-
opacity
→ Animation<
double> ? -
If non-null, the value from the Animation is multiplied with the opacity
of each image pixel before painting onto the canvas.
final
- package → String?
-
final
- repeat → ImageRepeat
-
How to paint any portions of the layout bounds not covered by the image.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → double
-
final
- semanticLabel → String?
-
A Semantic description of the image.
final
- src → String?
-
src is used to create Image.network()
it should not be null if clickableImageType is ClickableImageType.network
final
- width → double?
-
If non-null, require the image to have this width.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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