Selection class
Selection
- Annotations
Constructors
-
Selection({int version = 0, String? text, TaggedText? start, TaggedText? end, Offset? startPt, Offset? endPt, SelectionAnchor? startAnchor, SelectionAnchor? endAnchor, List<
Rect> ? rects, bool isHidden = false, Duration animationDuration = const Duration(seconds: 1), List<Rect> rectifier(List<Rect> ) = SelectionRectifiers.identity}) -
const
Properties
- animationDuration → Duration
-
Duration of the hide/unhide animation, defaults to 1 second.
final
- end → TaggedText?
-
The end of the selection, or null if text is not selected.
final
- endAnchor → SelectionAnchor?
-
The last word selected, or null.
final
- endIndex → int?
-
The index after the last character in selection, or null if none.
no setter
- endPt → Offset?
-
The local end selection point, or null.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isHidden → bool
-
Is selection hidden?
final
- isTextSelected → bool
-
Is text selected?
no setter
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
-
rectifier
→ List<
Rect> Function(List<Rect> ) -
Function that converts line rects into selection rects.
final
-
rects
→ List<
Rect> ? -
The selection rect(s), or null.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → TaggedText?
-
The start of the selection, or null if text is not selected.
final
- startAnchor → SelectionAnchor?
-
The first word selected, or null.
final
- startIndex → int?
-
The index of the first character in the selection, or null if none.
no setter
- startPt → Offset?
-
The local start selection point, or null.
final
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - text → String?
-
The selected text, or null if text is not selected.
final
- version → int
-
Build version of the Selections that contains this selection.
final
Methods
-
cleared(
) → Selection -
containsPoint(
Offset point) → bool -
Returns
true
if thepoint
is contained in the selection. -
copyWith(
{int? version, bool? isHidden, Duration? animationDuration, List< Rect> rectifier(List<Rect> )?}) → Selection -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updatedWith(
Paragraphs paragraphs, SelectionDragInfo? dragInfo) → Selection -
Returns a new Selection, updated with the provided
paragraphs
and an optionaldragInfo
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited