PercentProperty constructor
Create a diagnostics property for doubles that represent percentages or fractions.
Setting showName
to false is often reasonable for PercentProperty
objects, as the fact that the property is shown as a percentage tends to
be sufficient to disambiguate its meaning.
The showName
and level
arguments must not be null.
Implementation
PercentProperty(String name, double fraction, {
String ifNull,
bool showName = true,
String tooltip,
String unit,
DiagnosticLevel level = DiagnosticLevel.info,
}) : assert(showName != null),
assert(level != null),
super(
name,
fraction,
ifNull: ifNull,
showName: showName,
tooltip: tooltip,
unit: unit,
level: level,
);