RawMagnifier class

A common base class for magnifiers.

This sample demonstrates what a magnifier is, and how it can be used.
link

To create a local project with this code sample, run:
flutter create --sample=widgets.RawMagnifier.1 mysample

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.

A magnifier can be conveniently managed by MagnifierController, which handles showing and hiding the magnifier, with an optional entry / exit animation.

See:

Inheritance

Constructors

RawMagnifier({Key? key, Widget? child, MagnifierDecoration decoration = const MagnifierDecoration(), Clip clipBehavior = Clip.none, Offset focalPointOffset = Offset.zero, double magnificationScale = 1, required Size size})
Constructs a RawMagnifier.
const

Properties

child → Widget?
An optional widget to position inside the len of the RawMagnifier.
final
clipBehavior → Clip
Whether and how to clip the parts of decoration that render inside the loupe.
final
decoration → MagnifierDecoration
This magnifier's decoration.
final
focalPointOffset → Offset
The offset of the magnifier from RawMagnifier's center.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
magnificationScale → double
How "zoomed in" the magnification subject is in the lens.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → Size
The size of the 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, int wrapWidth = 65}) → 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