Trianglify for Flutter #

Flutter widget inspired by http://qrohlf.com/trianglify/

Add the Package

dependencies: flutter_trianglify: ^0.0.6

Cell size, variance, bleeds, color generator can be initialized from Widget:

Trianglify( bleedX: 0, bleedY: 10, cellSize: 35, gridWidth: MediaQuery.of(context).size.width + (200 * scaleFactor), gridHeight: 400 * scaleFactor, isDrawStroke: true, isFillTriangle: true, isFillViewCompletely: false, isRandomColoring: false, generateOnlyColor: false, typeGrid: Trianglify.GRID_RECTANGLE, variance: 20, palette: Palette.getPalette(Palette.BLUES), )

Web and command-line examples can be found in the example folder.

Web Examples #

In order to run the web examples, please follow these steps:

Clone this repo and enter the directory Run pub get Run pub run build_runner serve example Navigate to http://localhost:8080/web/ in your browser

Command Line Examples #

In order to run the command line example, please follow these steps:

Clone this repo and enter the directory Run pub get Run dart example/lib/trianglify_example.dart

Flutter Example #

Install Flutter

In order to run the flutter example, you must have Flutter installed. For installation instructions, view the online documentation.

Run the app

Open up an Android Emulator, the iOS Simulator, or connect an appropriate mobile device for debugging. Open up a terminal cd into the example/lib/trianglify_example directory Run flutter doctor to ensure you have all Flutter dependencies working. Run flutter packages get Run flutter run