Making drawings and animations in Flutter extremely simple

Overview

🎨

GraphX™

pub package style: effective dart License: MIT

| rendering | prototype | design |

Making drawings and animations in Flutter extremely simple.

wiki-tips.

To get some extended, boring explanations, and eventually some sample codes, check the GraphX™ Wiki


Try Graphx (0.0.9) on Dart Pad

news!

prototyping

GraphX is all about visuals, here you have some screen captures of random prototypes I've been doing, while developing and testing graphx.

For your GraphX scene to support Hot Reload, you should initialize your variables and DisplayObjects inside addedToStage, and optionally clean them in dispose.

artificial horizon parallax game charts pie color 2 simple particles drawing api playful v1

... jump to other gifs samples ...

Background.

GraphX™ is here to help you build custom drawings in your Flutter apps. Providing a great versatility to power those screen pixels to a different level.

It's inspired by the good-old Flash API, which forged my way into programming back in the days, and inspired many other rendering frameworks, in several languages through the years.

I was thinking how much I missed to "play" with code, to make things more organic, artistic, alive... I totally love Flutter, but I always feel that it requires too much boilerplate to make things move around (compared to what I used to code).

Even if GraphX™ is not an animation library (although has a small tween engine), nor a game engine, It can help you build really awesome user experiences! It just runs on top of CustomPainter... Using what Flutter SDK exposes from the SKIA engine through the Canvas, yet, gives you some "framework" to run isolated from the Widget's world.

Can be used to simple draw a line, a circle, maybe a custom button, some splash effect on your UI, or even a full-blown game in a portion of the screen.

Mix and match with Flutter as you please, as GraphX™ uses CustomPainter, it is part of your Widget's tree.

Concept.

The repo is in early stages. You can check the changelog to get the latest updates.

GraphX has support for loading rootBundle assets:

ResourceLoader.loadBinary(assetId)
ResourceLoader.loadGif(assetId)
ResourceLoader.loadTextureAtlas(imagePath, xmlPath)
ResourceLoader.loadTexture(assetId)
ResourceLoader.loadImage(assetId)
ResourceLoader.loadString(assetId)
ResourceLoader.loadJson(assetId)
ResourceLoader.loadSvg(assetId)

As well as network images (SVG is not supported on non-SKIA targets):

ResourceLoader.loadNetworkTexture(url);
ResourceLoader.loadNetworkSvg(url);

ResourceLoader also stores in cache based on the assetId or url provided. You can pass cacheId in most methods to override that, once the resources loaded, you can access them with:

ResourceLoader.getTexture(id);
ResourceLoader.getSvg(id);
ResourceLoader.getAtlas(id);
ResourceLoader.getGif(id);

GraphX™ also provides "raw" support for Text rendering, using the StaticText class.


How does it work?

GraphX™ drives a CustomPainter inside. The idea is to simplify the usage of Flutter's Canvas, plus adding the display list concept, very similar to the Widget Tree concept; so you can imperatively code, manage and create more complex "Scenes".

The library has its own rendering cycle using Flutter's Ticker (pretty much like AnimationController does), and each SceneWidgetBuilder does its own input capture and processing (mouse, keyboard, touches). Even if it runs on the Widget tree, you can enable the flags to capture mouse/touch input, or keystrokes events (if u wanna do some simple game, or desktop/web tool).

Sample code.

  body: Center(
    child: SceneBuilderWidget( /// wrap any Widget with SceneBuilderWidget
      builder: () => SceneController(
        back: GameSceneBack(), /// optional provide the background layer
        front: GameSceneFront(), /// optional provide the foreground layer
      ),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          Text(
            'You have pushed the button this many times:',
          ),
          Text(
            '$_counter',
            style: Theme.of(context).textTheme.headline4,
          ),
        ],
      ),
    ),
  ),

GraphX™ is based on "Scenes", each SceneBuilderWidget requires a SceneController. This controller is the initializer of the Scenes layers, which can be:

  • back (background painter),
  • front (foreground painter),
  • or both.

Also takes a SceneConfig(), so you can configure what you need from the Widget's side. You can make use of some predefined Scene configurators:

  • SceneConfig.static: If you plan to only use this scene to draw some graphics, like a background.
  • SceneConfig.games: Activates all GraphX features, auto render and update, pointers and keyboard support.
  • SceneConfig.tools: Shortcut of games, helpful if you wanna use it in some custom drawing editor, or similar with keyboard shortcuts.
  • SceneConfig.interactive (default): Probably the most common setup for mobile, enables all features except keyboard support.
  • SceneConfig.autoRender: Allows you to have a ticker running, and auto update the scene, with NO inputs (mouse/touch/keyboard), if you wanna have an animated Widget, or maybe if you wanna control it externally.

Each "Scene" has to extend Sprite, this root class represents the starting point of that particular scene hierarchy. Think of it as MaterialApp widget is to all other children Widgets in the tree.

Here we get into GraphX™ world, no more Widgets trees or immutable properties.

You can make custom UI widgets, games, or make use of GraphX to create a static drawing, like curved backgrounds, or complex shapes.

Is a good practice to override addedToStage() as your entry point, here the Scene is ready, the root class has been added to the glorified stage, so you can access the Canvas size through stage.stageWidth and stage.stageHeight, the keyboard manager (if available), and lots of other properties, up to the SceneController that owns the scene (stage.scene.core, although, that's irrelevant for now):

class GameScene extends Sprite {

  @override
  void addedToStage() {
    /// Here you can access the `stage`, get the size of the
    /// current Scene, keyboard events, or any stage property
    /// You can initialize your DisplayObjects here to play
    /// "safe" if you need to access any stage property.
  }

For now, GraphX™ has a few classes for rendering in the "display list": Like Shape (for "pen" drawings commands through it's graphics property), Sprite (create hierarchies of rendering objects), StaticText (for Texts), GxIcon (for Flutter icons), Bitmap (for GTexture, which is a wrapper around dart:ui.Image), MovieClip(for Spritesheet and Gif support), SvgShape (dependency for svg, package not included), SimpleParticleSystem (to create optimized particles for games), and Flare/Rive render objects which will live in another package/utility eventually to avoid dependencies.

By the way, in the previous example, GameScene is the root node in the display tree, the entry point where DisplayObjects renders, and where you need to add your own objects.

For instance, to create a simple purple circle:

@override
void addedToStage(){
    var circle = Shape();
    circle.graphics.lineStyle(2, Colors.purple.value) /// access HEX value of Color
      ..drawCircle(0, 0, 20)
      ..endFill();
    addChild(circle); // add the child to the rootScene.
}

Sprite internally extends from the abstract class DisplayObjectContainer, and as the name implies, is a container that can contain more DisplayObjects. Yet, Shape is a DisplayObject (another abstract class, and also, the root class of all rendering objects in GraphX), so it can't contain children. That makes it a bit more performant on each painter step. So, when you need to group objects, you should create Sprites and add children into it, even other Sprites, that's the idea of GraphX after all, group rendering objects so you can transform them independently or transform a parent Sprite (or subclass of it), and apply it to the tree inside of it, transformations are accumulative from parent to child ...

What is a transformation?

The ability to translate, scale, rotate, skew a DisplayObject through his properties: x, y, width, height, scaleX, scaleY, rotation, skewX, skewY, etc.

We could also use our root scene to draw things:

@override
addedToStage(){
  graphics.beginFill(0x0000ff, .6)
  ..drawRoundRect(100, 100, 40, 40, 4)
  ..endFill();
...
}

Pointer access

Pointer signals has been "simplified" as Mouse events now... as it's super easy to work with single touch / mouse interactions in DisplayObjects. There are a bunch of signals to listen on each object... taken from AS3, and JS.

  • onMouseDoubleClick
  • onMouseClick
  • onMouseDown
  • onMouseUp
  • onMouseMove
  • onMouseOver
  • onMouseOut
  • onMouseScroll

They all emit a MouseInputData with all the needed info inside, like stage coordinates, or translated local coordinates, which "mouse" button is pressed, etc.


Demos.

Some demos are only using GraphX™ partially


Feel free to play around with the current API, even if it's still rough on edges and unoptimized, it might help you do things quicker.

SKIA is pretty powerful!


help & socialize.

Discord Telegram
Discord Shield Telegram

Screencast Demos.

(Some demos uses GraphX's only for ticker, input events or initial scene graph, making usage of direct Canvas calls)._

  • charts bezier + gradient

    charts bezier + gradient

  • neumorphic button

    neumorphic button

  • 3d card shadow

    3d card shadow

  • 3d pizza box

    3d pizza box

  • pendulum

    pendulum

  • rating stars

    rating stars

  • rotating dial

    rotating dial

  • intro "universo flutter"

    intro

  • 3d spiral loader

    3d spiral loader

  • breakout game

    breakout game

  • gauges

    gauges

  • bubble loader

    bubble loader

  • xmas counter

    xmas counter

  • google fonts

    google fonts

  • graphics.drawTriangles

    graphics.drawTriangles

  • image transform

    image transform

  • svg sample demo

    svg sample demo

  • chart lines

    charts lines

  • charts pie

    charts pie color 1

  • mouse cursor support

    mouse cursor support

  • debug objects bounds

    debug objects bounds

  • demo sample tween

    demo sample tween

  • direction blur filter

    directional blur filter

  • hand drawing v1

    hand drawing v1

  • hand drawing v2

    hand drawing v2

  • drawing api playful v2

    drawing api playful v2

  • elastic band

    elastic band

  • flare playback

    Flare playback

  • flip child scenes

    Flip child scenes

  • flutter widgets mix

    Mix with Flutter widgets

  • icon with gradient paint

    icon painter gradient

  • inverted masks

    inverted masks

  • isometric demo

    isometric demo

  • light button

    light button

  • marquesina

    marquesina de texto

  • menu with mask

    menu mask

  • menu mouse test

    menu mouse

  • nested transformations

    nested transform touch

  • particles with alpha

    particles with alpha

  • particles blending

    particles blend

  • circular progress panel

    progress panel

  • rive playback

    rive playback

  • 3d rotation

    rotation 3d

  • spiral

    spiral

  • spritesheet explosion

    spritesheet explosion

  • supernova tween

    star effect

  • text rainbow

    text rainbow

  • basic tween animation

    tween animation

  • tween behaviour

    tween behaviour

  • tween color

    tween color

  • multiple scenes

    multiple scenes

  • line button ⇢

    line button

  • color picker ⇢

    color picker

  • responsive switch

    responsive switch


Donation

You can buymeacoffee or support GraphX™ via Paypal

Donate via PayPal

Support via buymeacoffee

Comments
  • ScenePainter._detectMouseMove() should be optional

    ScenePainter._detectMouseMove() should be optional

    There are many situations where you simply don't need to detect mouseover mouseout events when the mouse is still but objects are moving or being hidden / displayed.

    The issue is that I soon as you have a ticker, this will feed the system with still events every 16ms where the system will traverse the whole graph of object and proceed to do some hit test on them. This is expensive and should be avoided when you actually don't need it.

    We should have a flag in the stage to turn this off.

    opened by tlvenn 12
  • [Bug] MouseUp event not trigger!

    [Bug] MouseUp event not trigger!

    Hi:

    Looks like we have a bug on mouseup event.

    #1. MouseDown GShape A #2. directly move to GShape B #3. loosen fingers

    the GShape A MouseUp event not trigger.

    I think it's related to when I loosen fingers,the target element move to B, not A. I think we need a Global event manager to handle it for 100% make sure the event mouseup can be happen after mousedown happed, alright ?

    maybe we need store the last GdisplayObject on class State when MouseDown happened and focus use the cached GdisplayObject to trigger mouseup ?

    opened by imiskolee 9
  • [Question] How could I embed the drawing (rasterizing?) into some video stream?

    [Question] How could I embed the drawing (rasterizing?) into some video stream?

    Firstly, I would express my appreciation for your work, which is amazing and cool.

    If convenient for you, could you give my any hint on doing some stuffs which AE/Pr would do, like video composing, with Flutter widgets and your graphx abilities?

    Sorry for my poor knowledge but I want to know if it is possible, for I've known that Flutter is based on Skia. May it be okay to do some special work to be capable of video composing. Which document I should refer to?

    Excuse my strange language and thank you 👍

    opened by ryuujo1573 7
  • Painting text

    Painting text

    Hi, have you planned any improvements for text rendering. I’m painting >1000 paragraph objects per frame and it’s causing a huge lag.

    Apology for raising this as an issue.

    opened by SivaramSS 6
  • Restore cursor default shape when mouse is leaving the stage

    Restore cursor default shape when mouse is leaving the stage

    Hi @roipeker,

    Depending on where the cursor is on my stage, I customize it and sometimes, i hide it so I can draw something myself. The issue I have is that when the user is moving the mouse outside the stage, i can't seem to be able to restore the default cursor.

    I have tried to use stage!.onMouseLeave((event) => GMouse.basic()); but it does not work.

    Any idea how to do this ? Thanks !

    opened by tlvenn 4
  • Update `flutter_svg` package version

    Update `flutter_svg` package version

    The current used version prevent users to build the example project due to missing nullOk parameter missing in the Framework, this was fixed in the latest version of that package.

    Proposal

    Update flutter_svg version

    bug 
    opened by pedromassango 4
  • Wish the name was different

    Wish the name was different

    I came across this package recently and it is awesome, but deep down I always feel that it should have had a different name.

    Whenever I hear the term graphx the first thing that comes to my mind is network theory (search networkx) and graph data structures. There is also a popular library named graphx which does the same.

    Please note that this is just a personal opinion and I know it is too late to change the name. Also, the logic of deriving this name must have had origin in charts and graphs, but this library is much more than that. I just wanted to let you know as I was expecting something to do with graph algortihms in dart when I first heard about this package.

    Awesome work. Good luck 👍

    not an issue 
    opened by animator 3
  • Planned update to v3?

    Planned update to v3?

    Hey there!

    I really do love this lib and the use cases of it are tremendous. Do you also plan to upgrade the lib to v3 of Flutter? There are some binding issues as I'm aware of.

    Regards

    opened by buehler 2
  • GDisplayObject.requiresRedraw is a noop

    GDisplayObject.requiresRedraw is a noop

    Hi @roipeker ,

    Unless I am missing something, requiresRedraw is missing an implementation, in its current form it does nothing image

    I guess that's probably why there is a TODO 😄

    opened by tlvenn 2
  • Thinking of addChildAt

    Thinking of addChildAt

    Hi:

    I know we current has the API addChildAt for define z-index, but the max value must less than children.length. The limit not friendly build a UI keep it last layer if dynamic add children.

    So, I am thinking we can define the Index same as CSS z-index, we can define any int, and just sort children with the index when rending, I also do something before on Myself SVG render engine.

    opened by imiskolee 2
  • how to disable the partent scrollview

    how to disable the partent scrollview

    Hi:

    i am have a scenebuildwidget on a singlechildscrollview, and when I drag a shape, the singlechildscrollview also following hand scroll.

    I don't know how to disable the singlechildscrollview when I drag something.

    opened by imiskolee 2
  • Graphx coordinate system and platforms

    Graphx coordinate system and platforms

    Hi @roipeker,

    I have observed some weird behaviors regarding the coordinate system and its origin depending on the platform. I have tested it on OSX and on the web with Flutter 3.3.9

    My expectation is as follow, given the following code :

    final rect = GShape();
    rect.graphics.lineStyle(1, Colors.red, false).drawRect(0, 0, 9, 9);
    addChild(rect);
    

    I would expect to see a rectangle of 10px * 10px starting at the very top left of the stage.

    1. OSX

    With OSX, no matter the app / stage dimension I consistently get the following: image

    The height of the rectangle is 8px and the width is 9px.

    If i want to draw a line at the very top of the stage, i have to do

    final vline = GShape();
    vline.graphics.lineStyle(1, Colors.green, false).moveTo(0, 2).lineTo(100, 2).endFill();
    addChild(vline);
    

    image

    1. Web (Chrome)

    Things get funky here, 1px is always missing on the left so the rectangle is 9px wide, same as on OSX.

    However depending on the height of the chrome window, the stage origin float between 2 int coordinates and can even fall in between resulting in more than 1 pixel being painted for the line.

    The code for the following is exactly as before and what was posted above for the rectangle and the line. Only the height of the Chrome window changed.

    image image image image image

    There are probably multiple things at play here but is my expectation correct to begin with ?

    opened by tlvenn 3
  • Add support for dashed line

    Add support for dashed line

    Hi @roipeker,

    Would there be an easy way to add support to draw dashed lines with Graphx ? I remember having a similar ask when I was working with Graphic and the PR addressing it might give some pointers on how to implement it relatively easily.

    https://github.com/entronad/graphic/commit/33385a917c676f66c1521f5f317213ac145dabeb

    The gist of it being: image image

    enhancement 
    opened by tlvenn 10
  • DisplayObject.hitTest could bail out early when localPoint has a negative coordinate

    DisplayObject.hitTest could bail out early when localPoint has a negative coordinate

    image As it can be seen in the image above, if the local point has either x or y negative, it's impossible to have a hit test so we should bail as early as possible.

    For context, this is happening because I compute a layout of my background scene and then place each container / sprite using sprite.setPosition(x,y) to that their children are positioned in relative position to their parent.

    enhancement 
    opened by tlvenn 5
  • Don't transform to local coordinates when mouse input is already captured

    Don't transform to local coordinates when mouse input is already captured

    While i was debugging an issue with mouse input, I noticed that globalToLocal(input.stagePosition, input.localPosition); is always called even though it is only needed for the hitTouch which is only happening when the input has not been captured already.

    https://github.com/roipeker/graphx/blob/master/lib/src/display/display_object.dart#L113

    We should avoid this op in that case given this op will be called for each sprite / shape in your entire scene.

    opened by tlvenn 3
  • Ticker for front scene only

    Ticker for front scene only

    Hi,

    Currently the scene config and the ticker code assumes that if you want a ticker, you want it to cover both scenes but there are scenarios where you want control over when to render / update the back scene which contains heavy things to draw but let Graphx redraw the front / hud scene automatically.

    Could we have an enum (tickerScope maybe ?) in the scene config to drive this ? I think you either want both or front_only.

    opened by tlvenn 7
Releases(v1.0.5)
  • v1.0.5(Nov 19, 2022)

    [1.0.5]

    • adds support for the new PointerPanZoom*Event family on Listenable that overrides the mouse Signal (mouse wheel) on desktop OS. Basically, currently on desktop builds, everytime a mouse wheel event is triggered, a PointerPanZoomEvent is dispatched on the Listenable. Check [MyButton] in [SimpleInteractionsMain] demo, for an example of how to use it.
    • add Generic Type [T] support to addChild
    • updated some samples for the API.

    [1.0.4]

    • updated to run with flutter 3.

    [1.0.3]

    • code updated to improve points.

    [1.0.2]

    • merged null-safety branch.
    • upgraded Dart constraints >= 2.13
    • changed GKeyboard to use GKeys alias for LogicalKeyboardKey (breaking change in Flutter 2.5).
    • defaults SceneBuilderWidget.autoSize to false, avoid exceptions on Flex widgets.
    • added warning message for empty sized widget layout in SceneBuilderWidget.
    • put back ResourceLoader.loadNetworkSvg and remove most nullable Futures for non network assets.
    • cleanup some code + dart analysis.
    • cleanup examples code

    [1.0.1]

    • more null safety migrations.
    • experimental GDropShadowFilter.innerShadow (hurts performance).
    • add SceneBuilderWidget.autoSize to auto expand the scene on the parent widget.
    • fix bug with GText in LayoutUtils.row.
    • fix EventSignal bug, remove() callbacks while dispatching them.
    • prevents assigning NaN to GDisplayObject transform properties based on double.
    • some minor fixes and forced non-nullable properties.

    [1.0.0-nullsafety.0]

    • initial migration to null-safety
    • fix non-working examples.
    • fix a bug with GText layout.

    [0.9.9]

    • major fix for GTween when running lots of SceneControllers instances.
    • fix stage dispose exception with keyboard/pointer.
    • added some more ColorFilters.

    [0.9.8]

    • major code refactoring, remove svg_flutter as dependency to avoid breaking changes.
    • changed all methods that takes int hex colors + alphas, to Color (beginFill, beginGradientFill, stage.color, etc).
    • fix trace for web and dartpad output.
    • renamed most common classes (that do not start with G) to follow a GName pattern.
      • SimpleText > GText
      • GxIcon > GIcon
      • Sprite > GSprite
      • GxPoint > GPoint, and so on...
    • added dispose() to KeyboardManager and PointerManager... so it manages hot reloader better.
    • added LayoutUtils.objectFit() to resize GDisplayObject (specially Bitmaps), using BoxFit.
    • downgraded flutter_svg to 0.18.1 in "example" to make it usable in beta channel.
    • refactor resource_loader.dart, changed most methods to use named params, now only stores in cache if a cacheId is defined (and also returns the cached data).
    • GText now uses Flutter's TextStyle to make it more convenient.
    • added ResourceLoader.loadNetworkTextureSimple() using a simple http call in flutter (useful for dartpad).

    [0.9.7]

    • added MovieClip.gotoAndPlay lastFrame for animation.
    • exposed the GifAtlas::textureFrames so they can be used in MovieClips.
    • added several methods from Flutters Path in Graphics... (conicCurveTo(), arcToPoint(), arc()) with some new optional parameters for relative drawing.
    • added new signals for stage.onMouseEnter, stage.onMouseLeave to detect touch positions when it leaves the Widget area... ( useful for scene with buttons).

    [0.9.6+2]

    • change flutter_svg version to be compatible with stable branch.

    [0.9.6]

    • Improved docs.
    • Removed animations.dart, GTween is used in favor of Juggler.
    • Changed [GameUtils] to [Math], class to keep consistency with ActionScript/JS API.
    • Improved gradient support in Graphics. For the sake of representing all the options for different Gradient Shaders in GraphX, uncommon positional parameters where replaced by named parameters for lineGradientStyle() and beginGradientFill().
    • Fixed a bug with [StaticText.width] when using by default double.infinity, unsupported in Flutter web non-SKIA target.
    • Minor bugfixes.
    • Added package http and flutter_svg dependencies to facilitate some GraphX features.
    • Added [SvgUtils] with basic methods to work with svg data.
    • Renamed [AssetsLoader] to [ResourceLoader], and moved to the io namespace; to avoid confusion with Flutter concepts where asset reference a local resource.
    • Added [NetworkImageLoader] class, to provide the ability to load remote images. Can be used with [ResourceLoader.loadNetworkTexture] and [ResourceLoader.loadNetworkSvg]. WARNING: no CORS workaround for web targets.
    • Added cache capabilities to network images, and some new methods on [ResourceLoader]: loadNetworkSvg(), loadNetworkTexture(), loadSvg(), getSvgData().
    • Added [StaticText.build()] to simplify the initialization and styling of [StaticText].
    • Added [Keyboard], utility class to simplify interactions with stage.keyboard during update() phase [stage.onEnterFrame].

    [0.9.5]

    • Fixes DisplayObject.visible not being updated on rendering.
    • Added display object.setProps() as a shortcut to assign basic properties using GTween and immediate render.
    • Added GlowFilter, DropShadowFilter and ColorMatrixFilter.
    • Added GTween extension support to filters, can easily create tweens like:
      var glow = GlowFilter(4, 4, Colors.blue);
      box.filters = [glow];
      stage.onMouseDown.add((event) {
      glow.tween(duration: .3, blurX: 12, color: Colors.green);
      });
      stage.onMouseUp.add((event) {
      glow.tween(duration: .3, blurX: 4, color: Colors.blue);
      });
      
    • Added SystemUtils.usingSkia to restrict unsoported operations in regular Flutter web.
    • Fixed GTween.overwrite=1 so it finds the proper target object.

    [0.9.4]

    • fixes TextureAtlas XML parsing (some formarts were not readed properly).
    • added support for hot-reload: Now you can use SceneConfig.rebuildOnHotReload and stage.onHotReload to manage your own logic.
    • fixed some issues with dispose() not cleaning up vars (useful for hotReload).
    • added SceneController access to the stage (stage.controller).
    • Basic support for Flutter Web (no SKIA target needed!), will have to check all the APIs. New SystemUtils.usingSkia to check the compilation.

    [0.9.2] - [0.9.3]

    • added SceneController::resolveWindowsBounds() to get a GxRect in global coordinates, to calculate the screen offsets between GraphX scenes and other Widgets at different locations in the Widget tree.
    • StaticText now listens to systemFonts, to detect when fonts loaded at runtime (useful when using GoogleFonts package).

    [0.9.1]

    • GxIcon recreates ParagraphBuilder on each style change (otherwise throws an exception in latest builds with web-skia in dev channel).
    • each DisplayObject has its own Painter now for saveLayer, the bounding rect can't be skipped by $useSaveLayerBounds=true.

    [0.9.0]

    • GraphX moves to RC1!
    • new maskRect and maskRectInverted as an alternative to mask for masking DisplayObjects but makes scissor clipping with GxRect.
    • added GxMatrix.clone()
    • added GTween.timeScale to have a global control over tween times and delays.
    • added Graphics.beginBitmapFill and Graphics.lineBitmapStyle to Graphics, now you can fill shapes with Images!
    • improved Graphics.beginGradientFill for GradientType.radial... now you can specify the radius for it.
    • added support Graphics.drawTriangles(), (uses Canvas.drawVertices()), to create potentially 3d shapes. Supports solid fills: image, gradient, and color, but no strokes (lineStyle).
    • flipped CHANGELOG.md versions direction.
    • more code cleanup and updated README.md!

    [0.0.1+9]

    • readme fix.

    [0.0.1+8]

    • big refactor to initialize SceneController(), now it takes the [SceneConfig] from the constructor (withLayers() was removed).
    • cleanup docs to reflect the change.
    • no more [SceneRoot], now you can use [Sprite] directly as the root layer Scene!

    [0.0.1+7]

    • fix for mouse exit event not being detected when the scene is way too small and the pointer event happens too fast over the target.
    • an improved README.md

    [0.0.1+6]

    • exported back graphics_clipper
    • added experimental startDrag()/stopDrag() methods.

    [0.0.1+5]

    • added missing export in graphx.
    • testing discord integration.
    • GTween changed VoidCallback to Function to avoid linting errors.

    [0.0.1+4]

    • code clean up and minor fixes in the readme.
    • adds trace() global function, as an option to print(). It allows you to pass up to 10 arguments, and configure stack information to show through traceConfig(). So it can print caller name (method name), caller object (instance / class name where caller is), filename and line number with some custom format.

    [0.0.1+3]

    • Another improve to the README.md, gifs have links to videos, to check screencasts in better quality.
    • Added help & social links.
    • cleanup more code.

    [0.0.1+2]

    • Improved README.md with gif screencast samples.
    • cleanup some code.

    [0.0.1]

    • Initial release.
    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Jun 1, 2021)

    • more null safety migrations.
    • experimental GDropShadowFilter.innerShadow (hurts performance).
    • add SceneBuilderWidget.autoSize to auto expand the scene on the parent widget.
    • fix bug with GText in LayoutUtils.row.
    • fix EventSignal bug, remove() callbacks while dispatching them.
    • prevents assigning NaN to GDisplayObject transform properties based on double.
    • some minor fixes and forced non-nullable properties.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0.nullsafety.0(Mar 25, 2021)

    [1.0.0-nullsafety.0]

    • initial migration to null-safety
    • fix non-working examples.
    • fix a bug with GText layout.

    [0.9.9]

    • major fix for GTween when running lots of SceneControllers instances.
    • fix stage dispose exception with keyboard/pointer.
    • added some more ColorFilters.

    [0.9.8]

    • major code refactoring, remove svg_flutter as dependency to avoid breaking changes.
    • changed all methods that takes int hex colors + alphas, to Color (beginFill, beginGradientFill, stage.color, etc).
    • fix trace for web and dartpad output.
    • renamed most common classes (that do not start with G) to follow a GName pattern.
      • SimpleText > GText
      • GxIcon > GIcon
      • Sprite > GSprite
      • GxPoint > GPoint, and so on...
    • added dispose() to KeyboardManager and PointerManager... so it manages hot reloader better.
    • added LayoutUtils.objectFit() to resize GDisplayObject (specially Bitmaps), using BoxFit.
    • downgraded flutter_svg to 0.18.1 in "example" to make it usable in beta channel.
    • refactor resource_loader.dart, changed most methods to use named params, now only stores in cache if a cacheId is defined (and also returns the cached data).
    • GText now uses Flutter's TextStyle to make it more convenient.
    • added ResourceLoader.loadNetworkTextureSimple() using a simple http call in flutter (useful for dartpad).
    Source code(tar.gz)
    Source code(zip)
  • v0.9.10(Mar 25, 2021)

    [0.9.10]

    • start porting to null-safety.
    • fix a bug with GText layout.
    • updated pubspec dependencies

    [0.9.9]

    • major fix for GTween when running lots of SceneControllers instances.
    • fix stage dispose exception with keyboard/pointer.
    • added some more ColorFilters.

    [0.9.8]

    • major code refactoring, remove svg_flutter as dependency to avoid breaking changes.
    • changed all methods that takes int hex colors + alphas, to Color (beginFill, beginGradientFill, stage.color, etc).
    • fix trace for web and dartpad output.
    • renamed most common classes (that do not start with G) to follow a GName pattern.
      • SimpleText > GText
      • GxIcon > GIcon
      • Sprite > GSprite
      • GxPoint > GPoint, and so on...
    • added dispose() to KeyboardManager and PointerManager... so it manages hot reloader better.
    • added LayoutUtils.objectFit() to resize GDisplayObject (specially Bitmaps), using BoxFit.
    • downgraded flutter_svg to 0.18.1 in "example" to make it usable in beta channel.
    • refactor resource_loader.dart, changed most methods to use named params, now only stores in cache if a cacheId is defined (and also returns the cached data).
    • GText now uses Flutter's TextStyle to make it more convenient.
    • added ResourceLoader.loadNetworkTextureSimple() using a simple http call in flutter (useful for dartpad).
    Source code(tar.gz)
    Source code(zip)
  • v0.9.7(Jan 15, 2021)

    Update 0.9.7

    • added MovieClip.gotoAndPlay lastFrame for animation.
    • exposed the GifAtlas::textureFrames so they can be used in MovieClips.
    • added several methods from Flutters Path in Graphics... (conicCurveTo(), arcToPoint(), arc()) with some new optional parameters for relative drawing.
    • added new signals for stage.onMouseEnter, stage.onMouseLeave to detect touch positions when it leaves the Widget area... ( useful for scene with buttons).
    Source code(tar.gz)
    Source code(zip)
Owner
Roi Peker
Roi Peker is a enthusiastic software developer and designer. Always looking to learn something new, trying to follow the greek concept "meraki" always.
Roi Peker
A new Flutter dialog with a series of beautiful animations, slide fade rotate size scale rotate3D animations.

flutter_animated_dialog A new Flutter dialog with a series of beautiful animations, slide fade rotate size scale rotate3D animations. Dialog barrier i

null 20 Dec 3, 2022
Simple reactive animations in your Flutter apps.

just.motion Flutter package to create organic motion transitions. Why? The Motion Value stateless hot reload status notifier Ease Motion Spring Motion

Roi Peker 49 Nov 14, 2022
A Flutter package with a selection of simple yet very customizable set of loading animations.

Flutter Loading Animations A simple yet very customizable set of loading animations for Flutter projects. Installation Add the following to your pubsp

Andre Cytryn 171 Sep 23, 2022
🔔 A flutter package to create cool and beautiful text animations. [Flutter Favorite Package]

Animated Text Kit A flutter package which contains a collection of some cool and awesome text animations. Recommended package for text animations in C

Ayush Agarwal 1.4k Jan 6, 2023
Fun canvas animations in Flutter based on time and math functions.

funvas Flutter package that allows creating canvas animations based on time and math (mostly trigonometric) functions. The name "funvas" is based on F

null 472 Jan 9, 2023
A package to create nice and smooth animations for flutter

animation_director A package to create nice and smooth animations for flutter Introduction A simple package to build beautiful and smooth animations f

null 10 Nov 28, 2022
A flutter package which will help you to generate pin code fields with beautiful design and animations

A flutter package which will help you to generate pin code fields with beautiful design and animations. Can be useful for OTP or pin code inputs ?? ??

Adar 550 Dec 23, 2022
My UI and Animations Challanges in Flutter/Dart

ui_challenges Comecei com essa challange, por causa do novo emprego preciso de praticar muito mais animações e telas, toda semana uma UI Nova com o te

Geek Fabio 25 Sep 4, 2022
Easily add staggered animations to your ListView, GridView, Column and Row children.

Flutter Staggered Animations Easily add staggered animations to your ListView, GridView, Column and Row children as shown in Material Design guideline

null 1.2k Jan 6, 2023
A widget for stacking cards, which users can swipe horizontally and vertically with beautiful animations.

A widget for stacking cards, which users can swipe horizontally and vertically with beautiful animations.

HeavenOSK 97 Jan 6, 2023
A catalog of beautiful, reusable and elegant animations

Animations Catalog The goal of this project is to catalog and build multiple animation patterns with flutter. Budget App Animation Harley Swipe To Enl

null 3 Sep 6, 2021
SwiftUI - Examples projects using SwiftUI released by WWDC2019. Include Layout, UI, Animations, Gestures, Draw and Data.

SwiftUI Examples About Examples projects using SwiftUI & Combine. Include Layout, UI, Animations, Gestures, Draw and Data. See projects files in Files

Ivan Vorobei 4.2k Jan 8, 2023
Flutter package for creating awesome animations.

?? Simple Animations Simple Animations is a powerful package to create beautiful custom animations in no time. ?? fully tested ?? well documented ?? e

Felix Blaschke 879 Dec 31, 2022
A flutter package that adds support for vector data based animations.

animated_vector Description and inspiration A package that adds support for vector data based animations. The data format is heavily inspired from the

Potato Open Sauce Project 6 Apr 26, 2022
Timer UI animation challenge from 'Flutter Animations Masterclass'

stopwatch_flutter An IOS stopwatch challenge from Flutter Animations Masterclass - Full Course What I learned; Use timer Use ticker Create custom shap

Ali Riza Reisoglu 11 Jan 4, 2023
🐱‍👤 Flutter-Animation 🔥 🔥 List Animated Staggered Animations

??‍?? Staggered Animations made with algeria ❤

Hmida 17 Nov 22, 2022
A collection of Animations that aims to improve the user experience for your next flutter project.

A collection of Animations that aims to improve the user experience for your next flutter project.

Ezaldeen Sahb 134 Dec 24, 2022
A Flutter Log In Page using Flare Animations

Bear_log_in An example built using JCToon's Flare File as a custom UI component. Bear will follow the cursor as you type or move it around. Overview T

Apurv Jha 14 Oct 19, 2022
☀️ A Flutter package for some material design app intro screens with some cool animations.

IntroViews is inspired by Paper Onboarding and developed with love from scratch. Checkout our fully responsive live example app. Table of contents Fea

Ayush Agarwal 652 Dec 30, 2022