Skip to content
pubscout

repaint

0.1.1, released 2 years ago by plugfox.dev

Canvas library extending CustomPaint with event handling and frame control

WASM-ready
$ flutter pub add repaint
Source repository

What it does

RePaint provides a widget and painter that let you draw on a canvas, handle mouse and keyboard events, and control repainting. It adds features like inline widgets, frame rate control, and a quad‑tree for hit testing.

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

Use it when

  • Need interactive drawing or custom UI elements
  • Building a simple game or sketch app
  • Adding custom hit‑testing or event handling to a canvas
  • Want to control frame rate or repaint boundary

Skip it when

  • Simple static UI that can use standard widgets
  • Projects that already use a full game engine like Flame

Strengths

  • Rich event handling (mouse, keyboard)
  • Frame rate and repaint boundary control
  • Extends CustomPaint with useful defaults
  • Supports inline widget creation

Weaknesses

  • Limited documentation and examples
  • Newer package, fewer community resources
  • No built‑in physics or game loop

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Add `repaint: ^0.1.1` to pubspec and import `package:repaint/repaint.dart`

```dart
final painter = RePainterImpl();
Widget build(BuildContext context) {
  return Focus(
    onKeyEvent: painter.onKeyEvent,
    child: RePaint(
      painter: painter,
    ),
  );
}
```

Alternatives

Packages that do the same job and could replace repaint.

  • qr_flutter

    Flutter widget for rendering QR codes with customizable size, colors, and optional embedded images.

  • simple_tooltip

    A Flutter widget for customizable balloon‑style tooltips.

  • qr_widget

    Flutter widget for rendering QR codes with optional image overlay.

  • dash_painter

    Utility to paint dashed or dotted lines on a Flutter canvas.