Search packages, repositories and app categories

GitHub repositorytnantoka/flutter_shapes

flutter_shapes

Paint various shapes on canvas with Flutter CustomPainter

flutter_shapes project cover
Stars
15
Forks
4
Last push (UTC)
Apr 19, 2022
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

FlutterShapes

Live demo powered by Flutter for web.

Shape types

Adding FlutterShapes to your project

dependencies:
  flutter:
    sdk: flutter
  flutter_shapes:

Drawing a Shape

import 'package:flutter_shapes/flutter_shapes.dart';

class MyPainter extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    Paint paint = Paint()..color = Colors.black;
    Shapes shapes = Shapes(canvas: canvas, radius: 50, paint: paint, center: Offset.zero, angle: 0);

    shapes.drawCircle();                // method name
    shapes.drawType(ShapeType.Circle);  // enum
    shapes.draw('Circle');              // string
  }
}

Acknowledgements

https://proandroiddev.com/flutter-animation-creating-mediums-clap-animation-in-flutter-3168f047421e

A great article about animation with Flutter.
It helped me to write example codes.

Tatsuya Tobioka GitHub avatar
GitHub author

Tatsuya Tobioka ↗

hello world

LanguagesDartHTMLSwiftKotlinShellObjective-C

Packages published by this repository

Dependencies used

Dependency list 2 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗