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 ZoomlevelRange with 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 zoomlevel to be within this range.
isWithin(int zoomlevel) bool
Returns true if the given zoomlevel is within this range (inclusive).
matches(int zoomlevel) bool
Returns true if the given zoomlevel is 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 ZoomlevelRange that is the intersection of this range and the given range.
restrictToMax(int max) ZoomlevelRange
Creates a new ZoomlevelRange by restricting the maximum zoom level of this range to the given max value, if it is smaller.
restrictToMin(int min) ZoomlevelRange
Creates a new ZoomlevelRange by restricting the minimum zoom level of this range to the given min value, if it is greater.
toString() String
A string representation of this object.
override
widenTo(ZoomlevelRange range) ZoomlevelRange
Creates a new ZoomlevelRange that is the union of this range and the given range.

Operators

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