CupertinoMagnifier class

A RawMagnifier used for magnifying text in cases where a user's finger may be blocking the point of interest, like a selection handle.

CupertinoMagnifier is a wrapper around RawMagnifier that handles styling and transitions.

This magnifying glass is useful for scenarios on mobile devices where the user's finger may be covering part of the screen where a granular action is being performed, such as navigating a small cursor with a drag gesture, on an image or text.

See also:

Inheritance

Constructors

CupertinoMagnifier({Key? key, Size size = kDefaultSize, BorderRadius borderRadius = const BorderRadius.all(Radius.elliptical(60, 50)), Offset additionalFocalPointOffset = Offset.zero, List<BoxShadow> shadows = const <BoxShadow>[BoxShadow(color: Color.fromARGB(25, 0, 0, 0), blurRadius: 11, spreadRadius: 0.2, blurStyle: BlurStyle.outer)], Clip clipBehavior = Clip.none, BorderSide borderSide = const BorderSide(color: Color.fromARGB(255, 232, 232, 232)), Animation<double>? inOutAnimation})
Creates a RawMagnifier in the Cupertino style.
const

Properties

additionalFocalPointOffset Offset
Any additional focal point offset, applied over the regular focal point offset defined in kMagnifierAboveFocalPoint.
final
borderRadius BorderRadius
The border radius of this magnifier.
final
borderSide BorderSide
The border, or "rim", of this magnifier.
final
clipBehavior Clip
Whether and how to clip the shadows that render inside the loupe.
final
hashCode int
The hash code for this object.
no setterinherited
inOutAnimation Animation<double>?
This RawMagnifier's controller.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadows List<BoxShadow>
A list of shadows cast by the Magnifier.
final
size Size
The size of this magnifier.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

kDefaultSize → const Size
The default size of the magnifier.
kMagnifierAboveFocalPoint → const double
The vertical offset that the magnifier is along the Y axis above the focal point.