surface library
๐ Surface Library
A shapeable, layered, intrinsincally animated container Widget
offering convenient access to blurring ImageFilter
s,
Material
InkResponse
, and HapticFeedback
.
+ ๐ Bouncy Ball
A delightfully bouncy and position-mirroring reaction to user input on a piece of Material.
Turn ink splashes for an InkWell, InkResponse or material Theme
into ๐ BouncyBalls or ๐ฎ Glass
BouncyBalls
with the built-in InteractiveInkFeatureFactorys,
or design your own with ๐ช BouncyBall.mold.
๐ SurfaceLayer container layering offers robust customization.
- Support for both Colors and Gradients in both
๐ SurfaceLayer
BASE
andMATERIAL
layers.
Use ๐ Surface.radius
and ๐ SurfaceCorners
parameter
Surface.corners
to configure the shape.
- The ๐
baseRadius
may be specified separately, but is optional and will only impact the ๐ SurfaceLayer.BASE.
A ๐ฒ Peek may be provided to alter the Surface "peek"
(MATERIAL
inset or "border") with parameter ๐ฒ Peek.peek.
- Give special treatment, generally a thicker appearance, to selected side(s) by passing ๐ฒ Peek.peekAlignment and tuning with ๐ฒ Peek.peekRatio.
Specify a ๐ฌ Filter with options to render ๐คนโโ๏ธ SurfaceFX backdrop ImageFilters
- In configured ๐ Filter.filteredLayers
Set
- Whose radii (๐คนโโ๏ธ
effect
strength) are mapped with ๐ Filter.radiusMap- A ๐ SurfaceLayer.BASE filter may be extended through the Surface.margin with Filter.extendBaseFilter
A ๐ TapSpec offers TapSpec.onTap VoidCallback
,
InkResponse customization, and a HapticFeedback shortcut.
๐ฐ SurfaceShape.biBeveledRectangle
is responsible for the
๐ SurfaceCorners.BEVEL
custom shape.
References
- ๐ Surface - A shapeable, layered, animated container Widget
- ๐ฐ Shape
- ๐ Corner & ๐ CornerSpec
- ๐ฒ Peek - An Object with optional parameters to customize a Surface's "peek"
- ๐ TapSpec - An Object with optional parameters to customize a Surface's tap behavior
- ๐ฌ Filter - An Object with optional parameters to customize a ๐
Surface
's ๐คนโโ๏ธ filters/effects- ๐คนโโ๏ธ SurfaceFX -
Function typedef
for customFilterSpec.effect
s!
- ๐คนโโ๏ธ SurfaceFX -
๐ BouncyBall
A delightfully bouncy and position-mirroring reaction to user input on a piece of Material.
Turn ink splashes for an InkWell, InkResponse or material Theme
into ๐ BouncyBalls or ๐ฎ Glass
BouncyBalls
with the built-in InteractiveInkFeatureFactorys,
or design your own with ๐ช BouncyBall.mold.
๐ Just a few extra goodies for fun.
- ๐ฆ WithShading
Color
extension- โฌ
withBlack
.withBlack(int subtract)
- โฌ
withWhite
.withWhite(int add)
- โฌ
- ๐ค DragNub A small, round "handle" indicator used to visualize impression of draggable material
Classes
- BouncyBall
-
๐
BouncyBall
- CornerSpec
- ๐ CornerSpec
- DragNub
- Filter
- ๐ฌ Filter
- FX
- ๐คนโโ๏ธ Surface FX
- Peek
- ๐ฒ Peek
- Shape
- ๐ฐ Shape
- Surface
- ๐ Surface
- SurfaceShape
- TODO WIP
- TapSpec
- ๐ TapSpec
Enums
- Corner
- ๐ Corner
- SurfaceLayer
- ๐ SurfaceLayer
Extensions
- WithShading on Color
Typedefs
- SurfaceFX = ImageFilter Function(double specRadius, SurfaceLayer layerForRender)
- ๐คนโโ๏ธ Surface FX