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

squares 封面
插件详情v1.2.1

squares

一个灵活的棋盘小部件,适用于 Flutter。视觉上可自定义,并支持多种国际象棋变体。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
178
喜欢数
36
Pub 分数
140

安装插件

flutter pub add squares

插件介绍

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

Squares 是一个灵活的棋盘小部件,专为 Flutter 设计,适用于游戏开发,具有广泛的视觉自定义功能,并支持多种国际象棋变体。它使开发者能够轻松创建交互式棋盘,提供可调整的布局、棋子渲染和事件处理。该包非常适合用于构建国际象棋应用、谜题游戏或任何需要在多个平台上动态表示棋盘的棋盘类游戏。

适合场景

  • 构建国际象棋应用程序
  • 制作棋盘游戏原型
  • 实现国际象棋变体
  • 开发拼图游戏
  • 设计交互式教程
  • 支持多人桌游

主要特点

  • 高度可定制的外观
  • 内置对国际象棋变体的支持
  • 跨平台兼容性
  • 互动棋子移动
  • 模块化设计,便于扩展
  • 响应式布局调整

适合对象

  • Flutter 游戏开发者
  • 教育类应用程序开发者
  • 国际象棋变体爱好者
  • UI/UX设计师正在开发桌面游戏
  • 初学者学习Flutter游戏机制

使用建议

  • 需要理解国际象棋逻辑才能完全发挥功能
  • 自定义可能需要额外的样式知识
  • 大型画板或复杂动画带来的性能影响
  • 有限的内置规则执行
  • 未针对非国际象棋棋盘游戏进行优化

原始 README

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

Squares

A flexible chessboard widget for Flutter.

Squares is a chessboard like you've never seen before. Or more accurately, it is a chessboard very much like the ones you have seen before, but one that can do a pretty wide variety of things.

It is a UI package only, meaning it doesn't handle game logic. The Bishop package is recommended for game logic, and there is also a small interoperability package, Square Bishop that provides convenience methods for common type, a state for Squares to use, and extension methods on Bishop.Game that generate it.

There are two examples: a simple one in around 100 lines, and a more complex and featureful app that demonstrates the various features of Squares in a realistic architecture.

Squares has a stateless Board widget that can used to display a complete board representation, and can be integrated at a low level with your own UI logic. However, the more likely use case involves the BoardController widget, which implements all of the piece selection and movement logic you're likely to need, including premoves and piece promotion.

Features
  • Highlighting previous moves, possible moves, check/checkmate

  • Board themes

  • Marker themes

  • Piece animations

  • Premoves

  • Supports arbitrary board sizes and pieces



  • Piece promotion

  • Flexible piece set definitions - any widget will do, use an svg, image asset, text, etc

  • Dropping pieces from hands (à la Crazyhouse)

所属分类

依赖

依赖清单 2 项

源码仓库

使用此插件的项目

暂无相关数据。