Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

WP_CHESSBOARD

Chessboard

A very customizable Chessboard with awesomeness already onboard:

?️ Dragable Pieces

?️ Move Animations

? Orientation

? Hints

? Arrows

Features

?️ Dragable Pieces

Drag-Drop

?️ Piece Animations for Single Moves

Animate-Single

?️ Piece Animations for position changes/reset

Animate-Many

? Change Orientation

Board-Orientation

? Display Hints

Hints

? Display Arrows

Board-Arrows

Usage

First import the WPChessboard widget and the PieceMap class.

import 'package:wp_chessboard/wp_chessboard.dart';
import 'package:wp_chessboard/models/piece_map.dart';

Then, you are ready to use it

You can use your own piece set, in the example we will
use the chess_vectors_flutter package.

WPChessboard(
    size: size,
    squareBuilder: squareBuilder,
    controller: controller,
    onPieceDrop: onPieceDrop,
    onPieceTap: onPieceTap,
    onPieceStartDrag: onPieceStartDrag,
    onEmptyFieldTap: onEmptyFieldTap,
    pieceMap: PieceMap(
        K: (size) => WhiteKing(size: size),
        Q: (size) => WhiteQueen(size: size),
        B: (size) => WhiteBishop(size: size),
        N: (size) => WhiteKnight(size: size),
        R: (size) => WhiteRook(size: size),
        P: (size) => WhitePawn(size: size),
        k: (size) => BlackKing(size: size),
        q: (size) => BlackQueen(size: size),
        b: (size) => BlackBishop(size: size),
        n: (size) => BlackKnight(size: size),
        r: (size) => BlackRook(size: size),
        p: (size) => BlackPawn(size: size),
    ),
),

I know this is very short, for more information checkout the example :).

Additional information

Every contribution is very welcome.

Cheers ?


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.