A widget that displays a collection of dispersed and non-overlapping children

Overview

flutter_scatter

A widget that displays a collection of dispersed and non-overlapping children.

Pub Donate

Can be used to create word clouds: Word Cloud

Features

  • Built-in delegates (Spirals, Align, Ellipse).
  • Allow you to specify how to align chlidren.

Getting started

In the pubspec.yaml of your flutter project, add the following dependency: The latest version is Pub

dependencies:
  ...
  flutter_scatter: ^latest_version

In your library add the following import:

import 'package:flutter_scatter/flutter_scatter.dart';

For help getting started with Flutter, view the online documentation.

Widgets

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 EllipseScatterDelegate:

return Center(
    child: Scatter(
    delegate: EllipseScatterDelegate(
        a: 185.0,
        b: 185.0,
        step: 1.0 / count,
    ),
    children: widgets,
    ),
);

Ellipse

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 Alignment.topLeft.

By default, the Scatter will not try to fill gaps (for performance reasons). You can override this behavior by setting the fillGaps argument to true.

For example this is what the above word cloud would look if the fillGaps argument would be set to false: fillGaps to false

Delegates

Scatter has built-in delegates which can be highly parameterized:

Spirals

  • ArchimedeanSpiralScatterDelegate
  • FermatSpiralScatterDelegate
  • LogarithmicSpiralScatterDelegate

Spirals

Alignments

  • AlignScatterDelegate

Alignments

Ellipses

  • EllipseScatterDelegate

Ellipses

Examples

You can find more examples in this app.

Changelog

Please see the Changelog page to know what's recently changed.

Contributions

Feel free to contribute to this project.

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.
If you fixed a bug or implemented a new feature, please send a pull request.

You might also like...

A Flutter Widget to make interactive timeline widget.

A Flutter Widget to make interactive timeline widget.

Bubble Timeline Package A Flutter Widget to make interactive timeline widget. This widget can be used to make Event Timelines, or Timelines for certai

Sep 22, 2022

Widget, that can make any static located widget hidable

Widget, that can make any static located widget hidable

Installing See the official installing guidline from hidable/install Usage & Overview To start using Hidable widget, we have to create a ScrollControl

Dec 16, 2022

📸 Easy to use yet very customizable zoomable image widget for Flutter, Photo View provides a gesture sensitive zoomable widget.

📸 Easy to use yet very customizable zoomable image widget for Flutter, Photo View provides a gesture sensitive zoomable widget.

📸 Easy to use yet very customizable zoomable image widget for Flutter, Photo View provides a gesture sensitive zoomable widget. Photo View is largely used to show interacive images and other stuff such as SVG.

Jan 7, 2023

A widget that allow user resize the widget with drag

Flutter-Resizable-Widget A widget that allow user resize the widget with drag Note: this widget uses Getx Example bandicam.2021-11-11.12-34-41-056.mp4

Dec 13, 2022

A widget lib that the widget in this lib can react to flutter ScrollController's offset

A widget lib that the widget in this lib can react to flutter ScrollController's  offset

Language: English | 中文įŽ€äŊ“ linked_scroll_widgets A lib full of widgets that can react to the scrollController's offset change,to custom your UI effect.

Oct 16, 2022

Full customable rolling switch widget for flutter apps based on Pedro Massango's 'crazy-switch' widget

Full customable rolling switch widget for flutter apps based on Pedro Massango's 'crazy-switch' widget

lite_rolling_switch Full customable rolling switch widget for flutter apps based on Pedro Massango's 'crazy-switch' widget https://github.com/pedromas

Dec 1, 2022

A Flutter widget that will give a Glitch Animation Effect to it's child widget.

A Flutter widget that will give a Glitch Animation Effect to it's child widget.

GlitchEffect A Flutter widget that will give a Glitch Animation Effect to it's child widget. Installation Add the latest version of package to your pu

Nov 25, 2022

The SpannableGrid is a Flutter widget that allows its cells to span columns and rows and supports moving cells inside the grid.

The SpannableGrid is a Flutter widget that allows its cells to span columns and rows and supports moving cells inside the grid.

Spannable Grid The SpannableGrid is a Flutter widget that allows its cells to span columns and rows and supports moving cells inside the grid. Feature

Nov 7, 2022

A widget that can be dragged and scrolled in a single gesture and snapped to a list of extents.

A widget that can be dragged and scrolled in a single gesture and snapped to a list of extents.

Sliding Sheet A widget that can be dragged and scrolled in a single gesture and snapped to a list of extents. Click here to view the full example. Ins

Mar 10, 2022
Comments
  • my font size doesn't work

    my font size doesn't work

    Hi! I've tried to create my item for word cloud, replacing flutter hashtags. Color works but the font size no. In file flutter_scatter/example/lib/screens/word_cloud.dart, at the line 35, "body1" is deprecated, I've tried to use "bodyText1", "bodyText2" and others, but nothing changed. What can I do? Thanks. There is my code:

    class WordsCloudItem extends StatelessWidget { final String text; Color color; double size; int rotated; final int index;

    WordsCloudItem( this.text, this.index ){ setSizeAndColor(); this.rotated = Random().nextInt(2); }

    @override Widget build(BuildContext context) => RotatedBox( quarterTurns: rotated, child: Text( this.text, style: TextStyle( fontSize: size, color: color ) ), );

    void setSizeAndColor(){ if(index>81){color = Colors.red; size = 30.0;} else if(index>61){color = Colors.orange; size = 28.0; } else if(index>41){color = Colors.green; size = 26.0;} else if(index>21){color = Colors.blue; size = 24.0;} else color = Colors.purple; size = 22.0; } }

    opened by veronica-pignotti 3
Releases(v0.1.0)
Owner
Romain Rastel
Flutter Developer
Romain Rastel
A widget displaying children in a line with an overflow indicator at the end if there is not enough space.

overflow_view A widget displaying children in a line with an overflow indicator at the end if there is not enough space. Features Renders children hor

Romain Rastel 153 Dec 19, 2022
Displays a scrollable timeline with custom child widgets and custom icons.

Flutter Timeline Widget Displays a scrollable timeline with custom child widgets and custom icons. Installation In your pubspec.yaml file within your

Furkan Tektas 375 Nov 20, 2022
Displays a highly customizable week view (or day view) which is able to display events, to be scrolled, to be zoomed-in & out and a lot more !

Displays a highly customizable week view (or day view) which is able to display events, to be scrolled, to be zoomed-in & out and a lot more !

Hugo Delaunay 196 Dec 2, 2022
A collection of pixel-perfect iOS-styled components and properties for Flutter, following the official guidelines.

cupertinew ⚠ī¸ Experimental and work in progress ⚠ī¸ A collection of pixel-perfect iOS-styled components and properties for Flutter, following the offic

null 30 Nov 10, 2022
A collection of widgets for making amazing onboarding experience in your flutter applications

Pal widgets A flutter package for better onboarding. A set of amazing onboarding widgets for your flutter applications. Install package add in your pu

Apparence.io 25 Oct 7, 2022
A new flutter package for collection of common popular social media widgets

Social Media Widgets - package A new flutter package for collection of common popular social media widgets Currently available widgets Snapchat screen

theboringdeveloper 34 Nov 12, 2022
Material io ext - A collection of extensions for creating widgets following material.io guidelines

material_io_ext It is a collection of extensions for creating widgets following

null 3 Jan 28, 2022
A flutter carousel widget, support infinite scroll, and custom child widget.

carousel_slider A carousel slider widget. Features Infinite scroll Custom child widgets Auto play Supported platforms Flutter Android Flutter iOS Flut

Bart T 1 Nov 25, 2021
Progress Dialog widget for flutter projects with ability to customize loading widget, background color and background blur.

DISCONTINUED Checkout ArsDialog ars_progress_dialog Customizable progress dialog for Flutter applications with smooth animation for background dim col

Arsam 8 Apr 15, 2022
A simple Flutter widget to add in the widget tree when you want to show nothing, with minimal impact on performance.

nil A simple widget to add in the widget tree when you want to show nothing, with minimal impact on performance. Why? Sometimes, according to a condit

Romain Rastel 127 Dec 22, 2022