DOMView is a helper class for common operations on the DOM
- Implemented by
Constructors
- DOMView()
Properties
- hashCode → int
-
The hash code for this object.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
activate(
Element el) → void -
Activates
el
by adding the "active" class to it -
clearCache(
) → dynamic -
Clears the Cache
-
create(
Element host, String id) → Element -
Creates a new div with the given
id
on thehost
and returns theElement
-
deactivate(
Element el) → void -
Deactivates
el
by removing the "active" class from it -
get(
String id) → Element -
Gets an
Element
from the DOM by theid
or from the cache if available -
hide(
Element el) → void -
Hides
el
by adding the "hidden" class to it -
move(
Element el, Vector2 position) → void -
nextFrame(
) → Future<num> -
Returns a
Future
that resolves before the next animation frame with the given runtime -
remove(
String id) → void -
Removes an Element from the DOM by the
id
-
rotate(
Element el, Vector2 rotation) → void -
scale(
Element el, Vector2 scale) → void -
setDimensions(
Element el, Vector2 size) → void -
show(
Element el) → void -
Shows
el
by removing the "hidden" class from it -
timeout(
Duration duration, { Function before, Function after }) → Future -
Returns a
Future
that resolves afterDuration
and optionally callsbefore
andafter
the Duration. -
transform(
Element el, { Vector2 position, Vector2 rotation, Vector2 scale }) → void -
Updates the transform on
el
using optional Vectors. This function prevents seperate manual transform updates, that either update rotatiom, position or scale to override each other. -
wait(
Duration duration) → Future -
Returns a
Future
that resolves afterduration
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited