spritewidget
2.0.1, released 5 years ago by an unverified publisher
Toolkit for building complex, high performance animations and 2D games with Flutter.
WASM-ready
What it does
SpriteWidget provides a node-based graph system for rendering sprites, particle systems, and handling user input seamlessly within standard Flutter widgets. It supports image loading, texture atlases, motion tweens, sequences, constraints, and custom canvas drawing.
AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to build a 2D game or arcade-style application inside Flutter.
- You need high-performance sprite rendering mixed with standard Flutter and Material widgets.
- You require particle systems for effects like rain, smoke, or fire.
Skip it when
- You are building a standard CRUD or enterprise app where standard UI layouts and widgets suffice.
- You need 3D rendering capabilities.
Strengths
- Integrates smoothly with other Flutter and Material widgets.
- Built-in motion management for tweens, sequences, and groups.
- Includes particle systems and support for sprite sheets.
Weaknesses
- Imperative node-graph paradigm differs from Flutter's declarative widget tree.
- Limited to 2D animations and games.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Not documented
import 'package:flutter/material.dart';
import 'package:spritewidget/spritewidget.dart';
class MyWidget extends StatefulWidget {
@override
MyWidgetState createState() => new MyWidgetState();
}
class MyWidgetState extends State<MyWidget> {
late NodeWithSize rootNode;
@override
void initState() {
super.initState();
rootNode = NodeWithSize(const Size(1024.0, 1024.0));
}
@override
Widget build(BuildContext context) {
return SpriteWidget(rootNode);
}
}Alternatives
Packages that do the same job and could replace spritewidget.
Works with
Packages commonly used together with spritewidget: ones it builds on, ones built on it, and its own family.