canvas_view 1.0.0 copy "canvas_view: ^1.0.0" to clipboard
canvas_view: ^1.0.0 copied to clipboard

A two dimensional scrollable Canvas

CanvasView #

CanvasView is a Flutter widget that provides a bidirectional scrolling container for displaying multiple positioned widgets. It's designed to efficiently render and manage a large number of child components while allowing smooth panning and interaction.

Features #

  • Bidirectional Scrolling: Navigate freely in both horizontal and vertical directions.
  • Custom Positioning: Precisely place widgets at any coordinate within the canvas.
  • Efficient Rendering: Optimized for handling multiple widgets with performance in mind.

Example

Usage #

A simple example of how to use CanvasView:

CanvasView(
  diagonalDragBehavior: DiagonalDragBehavior.free,
  delegate: CanvasChildDelegate(children: children),
)

Where children is a list of CanvasComponent:

final List<CanvasComponent> children = [
  CanvasComponent(
    id: 'widget1',
    position: Offset(100, 200),
    widget: YourCustomWidget(),
  ),
];

Use Cases #

  • Infinite canvas applications
  • Custom diagram builders
  • Interactive maps
  • Flowchart editors

License #

This package is distributed under the MIT License.

0
likes
150
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

A two dimensional scrollable Canvas

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on canvas_view