flutter_turtle 0.0.1 copy "flutter_turtle: ^0.0.1" to clipboard
flutter_turtle: ^0.0.1 copied to clipboard

outdated

flutter_turtle is a simple implementation of turtle graphic. It simply uses a custom painter to draw graphics into a widget by aseries of LOGO-like given commands.

flutter_turtle #

flutter_turtle is a simple implementation of turtle graphics for Flutter. It simply uses a custom painter to draw graphics into a widget by a series of LOGO-like given commands.

Example #

screenshot.png

A quick example:

@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(widget.title)),
      body: TurtleView(
        child: Container(),
        commands: [
          PenDown(),
          SetColor(() => Color(0xffff9933)),
          Repeat(() => 20, [
            Repeat(() => 180, [
              Forward(() => 25.0),
              Right(() => 20),
            ]),
            Right(() => 18),
          ]),
          PenUp(),
        ],
      ),
    );
  }

Commands #

Currently supported commands are including:

  • PenDown
  • PenUp
  • Left
  • Right
  • Forward
  • SetColor
  • ResetPosition
  • ResetHeading
  • Repeat
44
likes
0
pub points
51%
popularity

Publisher

verified publisherzonble.net

flutter_turtle is a simple implementation of turtle graphic. It simply uses a custom painter to draw graphics into a widget by aseries of LOGO-like given commands.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_turtle