Filter constructor

const Filter({
  1. SurfaceFX effect = FX.blurry,
  2. Set<SurfaceLayer> filteredLayers = BASE,
  3. Map<SurfaceLayer, double>? radiusMap,
  4. double? radiusBase,
  5. double? radiusMaterial,
  6. double? radiusChild,
  7. bool extendBaseFilter = false,
})

A 🌟 Surface may be provided a 🔬 Filter to change filter appearance at all 📚 SurfaceLayers.

  • Set<SurfaceLayer> 👓 filteredLayers ultimately determines which 📚 Layers have filters enabled
  • 📊 _radiusMap or _radiusBase && _radiusMaterial && _radiusChild determine filter strength during creation
  • Use extendBaseFilter == true to have 📚 SurfaceLayer.BASE's filter extend to cover the Surface.margin insets.

While a new 🌟 Surface employs 🔬 DEFAULT, where 👓 filteredLayers is NONE, a new 🔬 Filter defaults 👓 filteredLayers to BASE and _baseRadius to 4.0.

❗ See Consideration in library surface.dart doc

Regarding 👓 Filter.filteredLayers and 📊 Filter.radiusMap values.

Default 📊 radius passed to 💧 FX.blurry is _BLUR == 4.0 & minimum is 0.0003.

Implementation

const Filter({
  this.effect = FX.blurry,
  this.filteredLayers = BASE,
  Map<SurfaceLayer, double>? radiusMap,
  double? radiusBase,
  double? radiusMaterial,
  double? radiusChild,
  this.extendBaseFilter = false,
})  : _radiusMap = radiusMap,
      _radiusBase = radiusBase,
      _radiusMaterial = radiusMaterial,
      _radiusChild = radiusChild;