shadows 0.9.0
SDKflutter
Platformandroidioswindowslinuxmacosweb
Flutter extensions on `BoxShadow`s and `List`s of them, as well helper methods for converting a `double` => Material "elevation" shadows.
👥 Shadows
WORK IN PROGRESS
Provides 👓 [BoxShadowUtils] extension on [BoxShadow] for manipulation of shadows by [copyWith].
- Consider the
operatoroverrides for even simpler syntax.
Provides ⛅ [BoxShadowsUtils] extension on List<BoxShadow> for mass shadow manipulation.
Provides 🕴 [Elevation] class with static methods used to simply produce [BoxDecoration]s from Flutter's top-level [kElevationToShadow].
📖 Reference
- 👓 [BoxShadowUtils] extension on [BoxShadow]
- 📋 [copyWith] Copy With replacement properties
- ❌ [*] "Multiply"
this[BoxShadow] by aColor - ❌ [*] "Multiply"
this[blurRadius] by anum - ➕ [+] "Add" to
this[spreadRadius] adouble smudgeSpread - ➖ [-] "Subtract" from
this[spreadRadius] adouble squishSpread - 📏 [%] "Modulate"
this[offset] byOffset[offsetScale]
- ⛅ [BoxShadowsUtils] extension on
List<BoxShadow>- 🎨 [colorize] a
List<BoxShadow>with single[Color]orList[colors]- Optionally ❓ [preserveOpacity] of the originals
- 📊 [rampOpacity] of a
List<BoxShadow>with single[double]orList[stops]- Optionally 🎨 override a [color] and ramp simultaneously
- 🎨 [colorize] a
- 🕴 [Elevation]'s static decoration methods
- [Elevation.asBoxShadows]
(double elevation, {Color? color}) - [Elevation.asBoxDecoration]
(double elevation, {Color? color})
- [Elevation.asBoxShadows]
- 🟦 [ElevationUtils] extension on
List<BoxShadow>- 🟦 [materialize] will apply the Material-standard shadow opacity map [kElevationShadowOpacityRamp] to a
List<BoxShadow>
- 🟦 [materialize] will apply the Material-standard shadow opacity map [kElevationShadowOpacityRamp] to a
🧫 Examples
🕴 Elevation
🟦 ElevationUtils
👓 BoxShadowUtils
⛅ BoxShadowsUtils
🌇 Roadmap
- Provide examples.
- Develop more utilities, like generating
List<BoxShadow>fromBoxShadowor applying some algorithm to theblurRadiuses in aList<BoxShadow>, etc.
🐞 Bugs
- None known.