- override
In checked mode, throws an exception if the object is not in a valid configuration. Otherwise, returns true.
This is intended to be used as follows:
assert(myDecoration.debugAssertIsValid());
Source
@override
bool debugAssertIsValid() {
assert(swatch != null
&& swatch[_lightShade] != null
&& swatch[_darkShade] != null
&& textColor != null
&& style != null
&& _position != null
&& _position.isFinite
&& _opacity != null
&& _opacity >= 0.0
&& _opacity <= 1.0
&& margin != null);
return true;
}