chess_vectors_flutter 1.0.12

  • Readme
  • Changelog
  • Example
  • Installing
  • 86

chess vectors flutter #

Chess pieces vectors for Flutter. These vectors are custom widgets based on Wikimedia commons Svg. You can customize the size.

Getting Started #

Add whatever piece widget you want to your components tree :

  • size property takes a double value for defining the piece side size (same width and height).


This project is using the SVG definitions of Chess pieces from a Wikimedia Commons page

[1.0.12] - 21/01/2020.

  • Important bug fix : the requested size is taken into account.

[1.0.10] - 01/07/2019.

  • More compliant to DartPub specification.

[1.0.8] - 30/06/2019.

  • Removed the offset property : one has to use Flutter Padding/Center/... widgets to achieve the same effects.

[1.0.6] - 08/09/2018.

  • Improved library for publishing on Dart Pub.

[1.0.4] - 08/09/2018.

  • Adapted library in order to be accepted by Dart 2.

[1.0.0] - 08/08/2018.

  • Initial release : all pieces widgets can be directly integrated into your components tree, can be moved and/or resized.


import '../lib/chess_vectors_flutter.dart'; // adapt import
import 'package:flutter/material.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
      home: new MyHomePage(),

class MyHomePage extends StatelessWidget {
  MyHomePage({Key key}) : super(key: key);

  Widget build(BuildContext context) {
    const commonSize = 50.0;
    return new Scaffold(
        appBar: new AppBar(
          title: new Text('Chess vectors experiment'),
        body: Container(
            decoration: BoxDecoration(
            child: Column(
              children: <Widget>[
                  children: <Widget>[
                    WhitePawn(size: commonSize),
                    WhiteKnight(size: commonSize),
                    WhiteBishop(size: commonSize),
                    WhiteRook(size: commonSize),
                    WhiteQueen(size: commonSize),
                    WhiteKing(size: commonSize)
                  children: <Widget>[
                    BlackPawn(size: commonSize),
                    BlackKnight(size: commonSize),
                    BlackBishop(size: commonSize),
                    BlackRook(size: commonSize),
                    BlackQueen(size: commonSize),
                    BlackKing(size: commonSize)

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  chess_vectors_flutter: ^1.0.12

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:chess_vectors_flutter/chess_vectors_flutter.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 24, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
tuple ^1.0.2 1.0.3
Transitive dependencies
collection 1.14.11 1.14.12
matcher 0.12.6
meta 1.1.8
path 1.6.4
quiver 2.1.2+1
sky_engine 0.0.99
stack_trace 1.9.3
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies