A widget that displays a collection of dispersed and non-overlapping children.
Can be used to create word clouds:
dependencies: ... flutter_scatter: ^latest_version
In your library add the following import:
For help getting started with Flutter, view the online documentation.
You can simply create a
Scatter by providing a delegate and a list of widgets.
The delegate is responsible for computing positions.
For example if you want to position your widgets on a circle, you will use the
return Center( child: Scatter( delegate: EllipseScatterDelegate( a: 185.0, b: 185.0, step: 1.0 / count, ), children: widgets, ), );
It may be useful to choose how children are aligned with the computed positions. By default, the center of the widgets will be placed on the positions generated by the delegate.
If you want to be left aligned, you will change the
alignment argument of the
Scatter to be
By default, the Scatter will not try to fill gaps (for performance reasons). You can override this behavior by setting the
fillGaps argument to
For example this is what the above word cloud would look if the
fillGaps argument would be set to
Scatter has built-in delegates which can be highly parameterized:
You can find more examples in this app.
Please see the Changelog page to know what's recently changed.
Feel free to contribute to this project.
Example app for the scatter widget
For help getting started with Flutter, view our online documentation.
Add this to your package's pubspec.yaml file:
dependencies: flutter_scatter: ^0.1.0
You can install packages from the command line:
$ flutter packages get
Alternatively, your editor might support
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.1.0||Nov 11, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.