Magnifier constructor

const Magnifier(
  1. {Key? key,
  2. Offset additionalFocalPointOffset = Offset.zero,
  3. BorderRadius borderRadius = const BorderRadius.all(Radius.circular(_borderRadius)),
  4. Color filmColor = const Color.fromARGB(8, 158, 158, 158),
  5. List<BoxShadow> shadows = const <BoxShadow>[BoxShadow(blurRadius: 1.5, offset: Offset(0, 2), spreadRadius: 0.75, color: Color.fromARGB(25, 0, 0, 0))],
  6. Size size = Magnifier.kDefaultMagnifierSize}
)

Creates a RawMagnifier in the Material style.

These constants and default parameters were taken from the Android 12 source code where directly transferable, and eyeballed on a Pixel 6 running Android 12 otherwise.

Implementation

const Magnifier({
  super.key,
  this.additionalFocalPointOffset = Offset.zero,
  this.borderRadius = const BorderRadius.all(Radius.circular(_borderRadius)),
  this.filmColor = const Color.fromARGB(8, 158, 158, 158),
  this.shadows = const <BoxShadow>[
    BoxShadow(
        blurRadius: 1.5,
        offset: Offset(0, 2),
        spreadRadius: 0.75,
        color: Color.fromARGB(25, 0, 0, 0))
  ],
  this.size = Magnifier.kDefaultMagnifierSize,
});