Dart SDK
dart:html
Dimension
class
Dimension
Properties
Constructors
Methods
Properties
value
Constructors
percent
px
pc
pt
inch
cm
mm
em
ex
css
Methods
toString
Class representing a
length measurement
in CSS.
Annotations
Experimental()
Properties
num
value
read-only
Return a unitless, numerical value of this CSS value.
Constructors
Dimension.percent
(
num
_value
)
Set this CSS Dimension to a percentage value.
Dimension.px
(
num
_value
)
Set this CSS Dimension to a pixel value.
Dimension.pc
(
num
_value
)
Set this CSS Dimension to a pica value.
Dimension.pt
(
num
_value
)
Set this CSS Dimension to a point value.
Dimension.inch
(
num
_value
)
Set this CSS Dimension to an inch value.
Dimension.cm
(
num
_value
)
Set this CSS Dimension to a centimeter value.
Dimension.mm
(
num
_value
)
Set this CSS Dimension to a millimeter value.
Dimension.em
(
num
_value
)
Set this CSS Dimension to the specified number of ems.
Dimension.ex
(
num
_value
)
Set this CSS Dimension to the specified number of x-heights.
Dimension.css
(
String
cssValue
)
Construct a Dimension object from the valid, simple CSS string cssValue that represents a distance measurement.
Methods
toString
(
) →
String
Print out the CSS String representation of this value.