搜索插件、代码仓与 APP 分类

插件详情v2.7.8

zerker

Zerker 是一个灵活且轻量级的 Flutter Canvas 图形动画库。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
90
喜欢数
92
Pub 分数
135

安装插件

flutter pub add zerker

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Zerker 是一个轻量且灵活的 Flutter 库,专为创建基于画布的图形动画而设计。它使开发者能够直接在画布上构建流畅、高性能的动画,非常适合交互式视觉效果和类似游戏的体验。Zerker 支持多个平台——包括 Android、iOS、Web、macOS、Windows 和 Linux,提供跨平台一致性。其极小的体积和直观的 API 使其适用于从简单动画到复杂视觉效果的各种场景,无论是游戏还是动态 UI 都能轻松应对。

适合场景

  • 创建动画游戏元素
  • 构建交互式 UI 组件
  • 实现自定义绘制动画
  • 开发跨平台画布图形
  • 在移动应用中添加视觉效果
  • 设计实时渲染界面

主要特点

  • 基于画布的动画引擎
  • 轻量且高性能
  • 跨平台兼容性
  • 灵活的动画控制
  • 支持实时渲染
  • 用于复杂视觉效果的简单 API

适合对象

  • 使用Flutter的游戏开发者
  • 需要自定义动画的UI设计师
  • 开发交互式仪表板的开发者
  • 视觉艺术应用的创作者
  • 针对多个平台的团队

使用建议

  • 需要理解画布绘图
  • 最适合性能要求高的动画
  • 可能需要额外的状态管理
  • 不适合基本的控件过渡
  • 有限的内置动画预设
  • 初学者的学习曲线更高

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。


pub package Made-with-Flutter Made-with-Dart

What is Zerker

Zerker is a flexible and lightweight flutter canvas graphic animation library.

With Zerker, you can create a lot of seemingly cumbersome animation effects, such as animated animations, pop-up animations, scene transitions, icon effects, and more.

At the same time, you can create a lot of simple games with Zerker. Zerker contains elements such as sprites, scrolling backgrounds, and atlases, making it easy to create game worlds with them.

➤ More detailed documentation about Zerker is here https://flutterkit.github.io/zerkerdocs/

An image

Installation

Add this to your package's pubspec.yaml file, And execute the commandflutter pub get:

dependencies:
  zerker: <latest_version_here>
More detailed installation steps, you can refer to here. https://pub.dev/packages/zerker/install

Getting started

Import the package
import 'package:zerker/zerker.dart';
Useage
Create a zerker widget
class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        ),
        body: Center(
          child: Zerker(app: MyZKApp(), clip: true, interactive: true, width: 350, height: 350),
        ));
  }
}
Create your Zerker class inherited from ZKApp
class MyZKApp extends ZKApp {

  @override
  init() {
    super.init();
    /// init zerker scene
  }

  @override
  update(int time) {
    super.update(time);
    sprite.position.x++;
  }
}
Initialize the scene and create elements in the init function
/// Create a zerker sprite
ZKSprite bigboy = ZKSprite(key: "bigboy")
  ..animator.make("front", [0, 1, 2, 3, 4])
  ..animator.make("left", ['5-9'])
  ..animator.make("after", ['10-14'])
  ..animator.make("right", ['15-19'])
  ..onTapDown = (event) {
    bigboy.animator.play("right", 8, true);
  };
stage.addChild(bigboy);

/// Create a zerker text
ZKText text = ZKText()
  ..setPosition(100, 100)
  ..text = "hello world"
  ..setStyle(color: Colors.blueGrey, backgroundColor: Colors.red[50]);
stage.addChild(_text);

More cases

You can quickly start learning an example here. https://flutterkit.github.io/zerkerdocs/guide/tutorial.html

More zerker examples you can view here https://github.com/flutterkit/zerker-samples. If you have any questions about Zerker, please let me know by email, thank you very much!

img img img

License

Zerker is licensed under MIT license. View license. https://github.com/flutterkit/zerker/blob/master/LICENSE

所属分类

源码仓库

使用此插件的项目

暂无相关数据。