Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.
/ entry Public archive
forked from MickaelHrndz/entry

Flutter package that lets you simply animate a widget into a visible state.

License

Notifications You must be signed in to change notification settings

ruudvring/entry

 
 

Repository files navigation

entry

Entry

Pub Package Platform style: effective dart CodeFactor License: MIT Donate


This Flutter package introduces a new widget : Entry.

It lets you simply animate a widget into a visible state.

  • Don't just display widgets : make them appear.
  • Lightweight and flexible : one widget is all you need.
  • Wrap a widget with an Entry widget and watch it come to life.

Entry animates opacity, scale, position and angle concurrently.

You can visualize the Curves constants on the doc page.

🏭 Constructors

Default

Entry({key, delay, duration, curve, opacity, scale, xOffset, yOffset, angle, child})

This constructor is motionless by default.

It includes every parameter available in named constructors.

Named

Entry has four named constructors :

  • Entry.all({opacity, scale, xOffset, yOffset, angle})

.all makes use of every animation by default, except for the angle.

The three others are each dedicated to a single animation :

  • Entry.opacity({opacity})
  • Entry.scale({scale})
  • Entry.offset({xOffset, yOffset})

The key, delay, duration, curve and child parameters are omitted here.

💕 Combining entries

Wrapping an Entry with another one works just as you expect it.

By playing with all the parameters, possibilities are endless.

You can copy one of the examples and start from there.

See in action

entry

👷 Grid builders

Fixed crossed-axis count

Using Entry with grid builders can create a staggered effect :

  • Wrap the generated child with an Entry widget
  • Multiply the delay value by the index % crossAxisCount

In result, the widgets of a same row will appear after each other.

See in action

entry

Randomization

You can set your delay and/or duration to a random number :

delay: Duration(milliseconds: random.nextInt(300))

This makes the entries look more independent from each other.

See in action

entry

✊ Motivation

  • Animations are key to elevate and refine the user experience.
  • By default, all widgets appear instantly. It feels basic, almost webpage-like.
  • Flutter doesn't provide a simple way to delay and animate a widget's entry into view.
  • Animations overall implies a lot of complexity and boilerplate code.
  • I got tired of copying the same file over multiple projects.

🙏 Credit

A special thank you to Felix Blaschke for his simple_animations package. This package literally depends on it.

About

Flutter package that lets you simply animate a widget into a visible state.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 46.8%
  • Dart 29.4%
  • CMake 18.1%
  • HTML 3.4%
  • C 1.0%
  • Swift 0.9%
  • Other 0.4%