Skip to content

Support gesture zoom/pan for arbitrary widget content #762

@fondoger

Description

@fondoger

Use case

ExtendedImage has strong gesture support for zoom, pan, double tap, page-view coordination, and slide-page dismissal, but the public image constructors are centered on ImageProvider/ui.Image content.

Some content should remain a Flutter widget tree instead of being rasterized first, for example:

  • SVG diagrams rendered by flutter_svg
  • charts or custom painters wrapped in widgets
  • video or mixed media that should share the same gesture behavior

Requested API

Expose a supported public API for arbitrary widget content to use the existing gesture machinery by supplying:

  • the child widget
  • its logical content size
  • BoxFit/alignment for the initial layout
  • the existing GestureConfig, double-tap, page-view, slide-page, and Hero hooks where applicable

A small widget such as ExtendedImageGestureWidget would make this ergonomic while preserving current ExtendedImage image-provider behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions