Skip to content
pubscout

canvas_danmaku

0.3.4, released 3 weeks ago by an unverified publisher

A high performance danmaku component for Flutter using CustomPainter.

WASM-ready
$ flutter pub add canvas_danmaku
Source repository

What it does

Canvas Danmaku provides a high performance danmaku (bullet comments) rendering library for Flutter. It uses CustomPainter to directly draw comments, optimizing repaints by layering scrolling and static danmakus and pausing when no danmaku is present.

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

Use it when

  • You need to display video overlay comments or bulletin messages (danmaku) in a Flutter app.
  • You require high performance rendering that minimizes widget tree complexity.

Skip it when

  • You need interactive danmaku items that users can click or tap on.

Strengths

  • High performance CustomPainter-based rendering
  • Optimized excessive repaint handling and power saving
  • Responsive layout that adapts to parent component height

Weaknesses

  • Danmakus rendered as animations are not interactive and cannot be clicked

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

none

import 'package:canvas_danmaku/canvas_danmaku.dart';

class _DanmakuPageState extends State<DanmakuPage> {
    late DanmakuController _controller;
    @override
    Widget build(BuildContext context) {
        return Stack(
        children: [
            Container(),
            DanmakuScreen(
            createdController: (e) {
                _controller = e;
            },
            option: DanmakuOption(),
            ),
        ],
        );
    }
}

Alternatives

Packages that do the same job and could replace canvas_danmaku.