chess_vectors_flutter 1.0.6 copy "chess_vectors_flutter: ^1.0.6" to clipboard
chess_vectors_flutter: ^1.0.6 copied to clipboard

outdated

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

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)
                  ],
                )
              ],
            )));
  }
}
15
likes
0
pub points
78%
popularity

Publisher

verified publisherpassion-programmation-laurentdu64.blogspot.com

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, tuple

More

Packages that depend on chess_vectors_flutter