chess_vectors_flutter 1.0.6

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 79

chess vectors flutter

Chess pieces vectors for Flutter. These vectors are custom widgets : they have their own size, they can also be moved (position property) inside their parent, and be resize (size property).

Getting Started

Add whatever piece widget you want to your components tree :

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

CREDITS

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

[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.

example/main.dart

// Replace the following import by 'package:chess_vectors_flutter.dart' in your project
import '../lib/chess_vectors_flutter.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: new MyHomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    const commonSize = 50.0;
    return new Scaffold(
        appBar: new AppBar(
          title: new Text('Chess vectors experiment'),
          backgroundColor: Colors.blue,
        ),
        body: Container(
            decoration: BoxDecoration(
              color: Colors.red,
            ),
            child: Column(
              children: <Widget>[
                Row(
                  children: <Widget>[
                    WhitePawn(size: commonSize),
                    WhiteKnight(size: commonSize),
                    WhiteBishop(size: commonSize),
                    WhiteRook(size: commonSize),
                    WhiteQueen(size: commonSize),
                    WhiteKing(size: commonSize)
                  ],
                ),
                Row(
                  children: <Widget>[
                    BlackPawn(size: commonSize),
                    BlackKnight(size: commonSize),
                    BlackBishop(size: commonSize),
                    BlackRook(size: commonSize),
                    BlackQueen(size: commonSize),
                    BlackKing(size: commonSize)
                  ],
                ),
                Row(
                  children: <Widget>[
                    WhiteRook(position: Offset(20.0, 5.0), size: 60.0)
                  ],
                )
              ],
            )));
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  chess_vectors_flutter: ^1.0.6

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages 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';
  
Version Uploaded Documentation Archive
1.0.6 Aug 9, 2018 Go to the documentation of chess_vectors_flutter 1.0.6 Download chess_vectors_flutter 1.0.6 archive
1.0.4 Aug 9, 2018 Go to the documentation of chess_vectors_flutter 1.0.4 Download chess_vectors_flutter 1.0.4 archive
1.0.2 Aug 9, 2018 Go to the documentation of chess_vectors_flutter 1.0.2 Download chess_vectors_flutter 1.0.2 archive
1.0.0 Aug 8, 2018 Go to the documentation of chess_vectors_flutter 1.0.0 Download chess_vectors_flutter 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
62
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
79
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

The description is too long. (-10 points)

Search engines will display only the first part of the description. Try to keep it under 180 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <3.0.0
flutter 0.0.0
tuple ^1.0.2 1.0.2
Transitive dependencies
collection 1.14.11
matcher 0.12.4
meta 1.1.6
path 1.6.2
quiver 2.0.1
sky_engine 0.0.99
stack_trace 1.9.3
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test