๐ Surface
WORK IN PROGRESS
Overhaul ongoing. Documentation & Readme may be out of date.
A  shapeable, layered, intrinsincally animated container widget offering convenient
access to blurring ImageFilters, Material InkResponse, and HapticFeedback.
+ ๐ BouncyBall
A delightfully bouncy and position-mirroring reaction to user input on a piece of Material.

Details in the screenshot above are from an outdated version.
๐ SurfaceLayer Container Division
Offers robust customization for a set app-wide style or on-the-fly changes.
- Support for Colors andGradients in both ๐SurfaceLayersBASEandMATERIALlayers.
- Support for three different filters and their strengths.
- The top-most of which will affect any InkResponsethat occurs on the middle ๐SurfaceLayer
 
- The top-most of which will affect any 
- Insets may be divided amongst different ๐ Layers by ๐Shape.padLayer.
๐ฐ Shape Customized SurfaceShapes
- ๐ Manual Shapeing is here! Work in progress.
- Defined by ๐ CornerSpecand generates aSurfaceShape.
- Optionally, provide a โ borderor ๐scaling.
๐ฒ Peek
๐ MATERIAL inset or "border", the size of which is set by parameter ๐ฒ Peek.peek.
- Give special treatment, generally a thicker appearance, to selected
side(s) by passing Peek.alignmentand tuning withPeek.ratio.
๐ TapSpec
If the ๐ Surface is TapSpec.tappable then:
- ๐ TapSpec.onTapcallback becomes available.
- Colors may be provided for InkResponsecustomization--thoughThemeDatadefaults are accessed otherwise.
- Consider a HapticFeedbackshortcut ๐TapSpec.providesFeedback.
- Enjoy the ๐ BouncyBallsplashFactory, pick your own, or have ๐Surfacedefault to yourTheme's.
๐ฌ Filter defines ๐คนโโ๏ธ SurfaceFX ImageFilters
- In configured ๐ Filter.filteredLayersSet- Whose radii (strength) are mapped with ๐ Filter.radiusMap
 
- Whose radii (strength) are mapped with ๐ 
- A ๐ SurfaceLayer.BASEfilter may be extended through theSurface.marginwithFilter.extendBaseFilter.
- ๐คนโโ๏ธ SurfaceFX typedeffor passing along your ownFilterSpec.effects based on ๐SurfaceLayerand the currentLayer'sradius.- Default effect is a nice gaussian blur (though a new ๐ Surfacehas no active effects).
 
- Default effect is a nice gaussian blur (though a 
๐คนโโ๏ธ FX Open to Grow
Currently only responsible for ๐ง FX.blurry, the default ImageFilter for ๐ฌ Filter.
๐ Reference
๐ Surface - A shapeable, layered, animated container Widget
- Defined by ๐ CornerSpecand generates aSurfaceShape
๐ฒ 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 typedeffor 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 custom rubber Paint using ๐ช BouncyBall.mold.
๐ Just a few extra goodies for fun.
- ๐ฆ `WithShading`Colorextension- โฌ `withBlack`.withBlack(int subtract)
- โฌ `withWhite`.withWhite(int add)
 
- โฌ 
- ๐ค `DragNub`A small, round "handle" indicator used to visualize impression of draggable material
๐ Roadmap
This is my first public package and I expect things may still be altered greatly.
- Speaking of which, an overhaul is currently ongoing as of 0.4.0. I am still new to Dart and improving my programming. Feel absolutely free to suggest improvements or make PRs.
- Since releasing Surface, I have found many more advanced and powerful packages. StillSurfaceprogress marches onward as I plan to continue development as I learn.
- For example, I have already earned experience in deprecating features and "bad pushes"!
๐ณ Animations of ๐ Surface.shape change.
โ
 Differed radius on ๐ SurfaceLayer.MATERIAL vs ๐ SurfaceLayer.BASE
- Smaller inner radius gives a better aesthetic for nested shapes.
- ๐ Manual setting of- Surface.radiusor- Surface.baseRadiusavailable now.
- ๐ Manual Shapeing is here! Work in progress.
โ
 Proposed SurfaceCornerSpec for Surface.corners parameter or expansion of ๐ฐ SurfaceShape class that allows customization of all four corners independently.
- ๐ Manual Shapeing is here! Work in progress.
๐ Surface Example
See example usage of the ๐ Surface package for Flutter:
- Surface Example Android source: /example/lib/main.dart
- Animated GIF preview of Surface Example app
- Surface Example APK
๐ SOURCE FOR BACKGROUND
Libraries
- surface
- ๐ Surface Library