SNumber class

用于表示一个可能是百分比也可能是确切的数的对象 当表示为百分比时,percent必须是一个0-100之间的数

Constructors

SNumber(double number, bool percent)
const
SNumber.number(double number)
const
SNumber.percent(double number)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
number double
final
percent bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

convert(num number) double
给定一个数,如果当前对象是百分比则返回给定数的百分比 否则返回当前的值
isPositiveNumber() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
percentRatio() double
toString() String
A string representation of this object.
override

Operators

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

Constants

zero → const SNumber