SelectionRegion class final

Immutable inclusive cell bounds (minCol..maxCol, minRow..maxRow) for selection clamping.

Constructors

SelectionRegion({required int minCol, required int maxCol, required int minRow, required int maxRow})
Creates a SelectionRegion.
const
SelectionRegion.fromRect(Rect rect)
Creates a SelectionRegion from a Rect with positive dimensions.
factory

Properties

hashCode → int
The hash code for this object.
no setteroverride
maxCol → int
Maximum inclusive column index.
final
maxRow → int
Maximum inclusive row index.
final
minCol → int
Minimum inclusive column index.
final
minRow → int
Minimum inclusive row index.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

contains(int col, int row) → bool
Whether (col, row) lies inside this region (inclusive).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
translate({int dCol = 0, int dRow = 0}) → SelectionRegion
Returns a copy of this region translated by (dCol, dRow).

Operators

operator ==(Object other) → bool
The equality operator.
override