ZoomlevelRange class
An immutable range of zoom levels, defined by a minimum and maximum value.
Constructors
- ZoomlevelRange([int zoomlevelMin = 0, int zoomlevelMax = 25])
-
Creates a new
ZoomlevelRange.const - ZoomlevelRange.standard()
-
Creates a new
ZoomlevelRangewith the default standard zoom levels (0-22).const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- zoomlevelMax → int
-
final
- zoomlevelMin → int
-
final
Methods
-
ensureBounds(
int zoomlevel) → int -
Clamps the given
zoomlevelto be within this range. -
isWithin(
int zoomlevel) → bool -
Returns true if the given
zoomlevelis within this range (inclusive). -
matches(
int zoomlevel) → bool -
Returns true if the given
zoomlevelis within this range (inclusive). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restrictTo(
ZoomlevelRange range) → ZoomlevelRange -
Creates a new
ZoomlevelRangethat is the intersection of this range and the givenrange. -
restrictToMax(
int max) → ZoomlevelRange -
Creates a new
ZoomlevelRangeby restricting the maximum zoom level of this range to the givenmaxvalue, if it is smaller. -
restrictToMin(
int min) → ZoomlevelRange -
Creates a new
ZoomlevelRangeby restricting the minimum zoom level of this range to the givenminvalue, if it is greater. -
toString(
) → String -
A string representation of this object.
override
-
widenTo(
ZoomlevelRange range) → ZoomlevelRange -
Creates a new
ZoomlevelRangethat is the union of this range and the givenrange.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override