foil library
Wrap a widget with Foil
, providing a rainbow shimmer
that twinkles as the accelerometer moves as well as
tons of additional neat gradient features.
pub.dev Listing | API Doc | GitHub
API References: Foil
| Foils
| Roll
| Crinkle
| Foil.sheet
| Steps
| GradientUtils
Extra Goodies
-
Three new variety of
Gradient
that do not gradate, but hard-transition:LinearSteps
RadialSteps
SweepSteps
😏
-
Foils
abstract class with a variety of static constGradient
s -
GradientUtils
extensions for eachGradient
Gradient copyWith()
methods
-
GradientTween
specializingTween<Gradient>
to useGradient.lerp()
.
Classes
- Crinkle
-
Provide animation to a piece of
Foil
by wrapping it in aRoll
with a specifiedCrinkle
. - Foil
-
Wrap a widget with
new Foil
, providing a rainbow shimmer that twinkles as the accelerometer moves. - Foils
-
Pre-rolled
Gradient
s for deployment asFoil.gradient
or anywhere else aGradient
is called for. - GradientTween
-
An interpolation between two
Gradient
s. - LinearSteps
- A 2D linear stepped "gradient".
- RadialSteps
- A 2D radial stepping "gradient".
- Roll
-
Provide a
Roll
forFoil
. - RollState
-
Provide a
Roll
ofFoil
such that any descendents may obtain theirFoil.gradient
value from this definition. - Scalar
-
A
Scalar
provides an opportunity to scale axis-baseddouble
data. Default constructor takes named paramters per axis. Use Scalar.xy as a shortcut to only provide positionaldouble
values. - Sheet
-
A wrapper for the parameters that pertain to an
Animated
/Container. - SweepSteps
- A 2D stepping sweep "gradient".
- TranslateGradient
-
This class's transform method considers TextDirection and
will consider positive values as translation to the right if
ltr
and translate left for positive values ifrtl
.
Extensions
- GradientUtils on Gradient
-
Offers copyWith method to make duplicate
Gradient
s. - LinearGradientUtils on LinearGradient
-
Offers copyWith method to make duplicate
Gradient
s. - RadialGradientUtils on RadialGradient
-
Offers copyWith method to make duplicate
Gradient
s. - SweepGradientUtils on SweepGradient
-
Offers copyWith method to make duplicate
Gradient
s.
Typedefs
- TransformGradient = GradientTransform Function(double x, double y)
-
The definition of a
Function
that positionally accepts a
double x
thendouble y
and returns a GradientTransform,
such as the default for this package: TranslateGradient.