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

maze 封面
插件详情v3.0.0

maze

一个简单的 Flutter 迷宫游戏。它同时也作为 CustomPainter 的示例。

AndroidiOSmacOSWindowsLinux
近 30 天下载
28
喜欢数
24
Pub 分数
140

安装插件

flutter pub add maze

插件介绍

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

一个使用 Flutter 构建的简单迷宫游戏,展示了 CustomPainter 的使用。它提供了一种交互式的游戏体验,用户可以通过生成的迷宫导航到达出口。该包既可作为有趣的迷你游戏,也可作为开发者学习如何在 Flutter 中实现自定义绘图的实用示例。其简洁的代码结构非常适合教育用途。

适合场景

  • 学习 Flutter 中的 CustomPainter
  • 构建简单的迷宫游戏
  • UI 渲染的教育示例
  • 创建互动谜题
  • 演示 Dart 中的游戏逻辑

主要特点

  • CustomPainter 实现
  • 随机迷宫生成
  • 交互式玩家移动
  • 简单的游戏机制
  • 跨平台兼容性

适合对象

  • Flutter 初学者
  • 游戏开发学习者
  • UI/UX 教育者
  • Dart 开发人员探索图形
  • 教育项目

使用建议

  • 有限的游戏深度
  • 无多人游戏或计分功能
  • 最小的自定义选项
  • 未针对大型迷宫进行优化
  • 主要用作示例,而非生产游戏

原始 README

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

maze_game

A simple maze game in Flutter. It also serves as a CustomPainter example.

¿Why?

In another project, I needed to create a "simple" maze game that can be used in low-end devices, so game engine was not an option.

Suddenly, I found a way to do it in pure Android.

Maze

So, this is a "port" of that saviour example.

Maze package

pub Project Status: Active License: MIT style: very good analysis

You can use it in your project, you only need to add the dependency:

dependencies:
  flutter:
    sdk: flutter
  maze_game: 3.0.0

Now you can create your Maze:

Maze(
    player: MazeItem(
        'https://image.flaticon.com/icons/png/512/808/808433.png',
        ImageType.network),
    columns: 6,
    rows: 12,
    wallThickness: 4.0,
    wallColor: Theme.of(context).primaryColor,
    finish: MazeItem(
        'https://image.flaticon.com/icons/png/512/1506/1506339.png',
        ImageType.network),
    onFinish: () => print('Hi from finish line!'))

所属分类

依赖

依赖清单 3 项

源码仓库

使用此插件的项目

暂无相关数据。