surface library

๐ŸŒŸ Surface Library

A shapeable, layered, intrinsincally animated container Widget offering convenient access to blurring ImageFilters, 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.


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


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
  • ๐Ÿ”ฒ 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 custom FilterSpec.effects!

๐Ÿ“ 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