Skip to content
pubscout

canvas_kit

0.6.1, released 9 months ago by codealchemist.dev

Composable infinite pan/zoom canvas widget for Flutter with camera control.

WASM-ready
$ flutter pub add canvas_kit
Source repository

What it does

Provides a zoomable and pannable 2D coordinate space for Flutter. It supports draggable world items, fixed viewport overlays, boundary constraints, and programmatic camera navigation.

AI-written summary of version 0.6.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Building node editors, flowcharts, or mind maps
  • Developing design tools, whiteboards, or visual planning apps
  • Displaying large data visualizations or network diagrams

Skip it when

  • Creating simple scrolling lists or grids
  • Working with fixed-size content where regular layouts are simpler
  • Building text-heavy interfaces where zooming can hurt readability

Strengths

  • Drop-in solution working with any Flutter widgets
  • Handles complex gesture conflicts between panning, zooming, and item dragging
  • Supports world and viewport mixing for fixed UI elements
  • Performance optimized with world-space culling

Weaknesses

  • Early version with an evolving public API that may include breaking changes
  • Most testing has been done on desktop and web, requiring validation on mobile

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

not documented

import 'package:flutter/material.dart';
import 'package:canvas_kit/canvas_kit.dart';

class MyCanvasPage extends StatefulWidget {
  @override
  State<MyCanvasPage> createState() => _MyCanvasPageState();
}

class _MyCanvasPageState extends State<MyCanvasPage> {
  late final CanvasKitController _controller;

  @override
  void initState() {
    super.initState();
    _controller = CanvasKitController();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('My Canvas Kit')),
      body: CanvasKit(
        controller: _controller,
        children: [],
      ),
    );
  }
}

Alternatives

Packages that do the same job and could replace canvas_kit.

Works with

Packages commonly used together with canvas_kit: ones it builds on, ones built on it, and its own family.