validate method
void
validate()
Implementation
void validate() {
if (duration < Duration.zero) {
throw ArgumentError.value(duration, 'duration', 'Must be non-negative.');
}
if (animationDuration < 0) {
throw ArgumentError.value(
animationDuration, 'animationDuration', 'Must be non-negative.');
}
if (fontSize <= 0) {
throw ArgumentError.value(
fontSize, 'fontSize', 'Must be greater than 0.');
}
if (borderRadius < 0) {
throw ArgumentError.value(
borderRadius, 'borderRadius', 'Must be non-negative.');
}
if (maxWidth <= 0) {
throw ArgumentError.value(
maxWidth, 'maxWidth', 'Must be greater than 0.');
}
if (iconSize < 0) {
throw ArgumentError.value(iconSize, 'iconSize', 'Must be non-negative.');
}
if (iconSpacing < 0) {
throw ArgumentError.value(
iconSpacing, 'iconSpacing', 'Must be non-negative.');
}
if (topMargin < 0) {
throw ArgumentError.value(
topMargin, 'topMargin', 'Must be non-negative.');
}
if (bottomMargin < 0) {
throw ArgumentError.value(
bottomMargin, 'bottomMargin', 'Must be non-negative.');
}
if (shadowBlurRadius < 0) {
throw ArgumentError.value(
shadowBlurRadius, 'shadowBlurRadius', 'Must be non-negative.');
}
}