ConfettiOptions class
Constructors
ConfettiOptions.new ({List <Color > colors = defaultColors , int particleCount = 50 , double angle = 90 , double spread = 45 , double startVelocity = 45 , double decay = 0.9 , double gravity = 1 , double drift = 0 , bool flat = false , double scalar = 1 , double x = 0.5 , double y = 0.5 , int ticks = 200 })
const
Properties
angle
→ double
The angle in which to launch the confetti, in degrees. 90 is straight up.
final
colors
→ List <Color >
An array of color strings.
final
decay
→ double
How quickly the confetti will lose speed.
Keep this number between 0 and 1, otherwise the confetti will gain speed.
Better yet, just never change it.
final
drift
→ double
How much to the side the confetti will drift.
The default is 0, meaning that they will fall straight down.
Use a negative number for left and positive number for right.
final
flat
→ bool
Optionally turns off the tilt and wobble that three dimensional confetti
would have in the real world.
final
gravity
→ double
How quickly the particles are pulled down.
1 is full gravity, 0.5 is half gravity, etc.,
but there are no limits. You can even make particles go up if you'd like.
final
hashCode
→ int
The hash code for this object.
no setter inherited
particleCount
→ int
The number of confetti to launch.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
scalar
→ double
Scale factor for each confetti particle.
Use decimals to make the confetti smaller.
final
spread
→ double
How far off center the confetti can go, in degrees.
45 means the confetti will launch at the defined angle plus or minus 22.5 degrees.
final
startVelocity
→ double
How fast the confetti will start going, in pixels.
final
ticks
→ int
How many times the confetti will move.
final
x
→ double
The x position on the page,
with 0 being the left edge and 1 being the right edge.
final
y
→ double
The y position on the page,
with 0 being the top edge and 1 being the bottom edge.
final
Methods
copyWith ({int ? particleCount , double ? angle , double ? spread , double ? startVelocity , double ? decay , double ? gravity , double ? drift , bool ? flat , double ? scalar , double ? x , double ? y , int ? ticks , List <Color > ? colors })
→ ConfettiOptions
Create a copy of this object with the given fields replaced with new values.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited