isRangesChanged method
Implementation
bool isRangesChanged(RulerPicker oldWidget) {
if (oldWidget.ranges.length != widget.ranges.length) {
return true;
}
if (widget.ranges.isEmpty) return false;
for (int i = 0; i < widget.ranges.length; i++) {
RulerRange oldRange = oldWidget.ranges[i];
RulerRange range = widget.ranges[i];
if (oldRange.begin != range.begin ||
oldRange.end != range.end ||
oldRange.scale != range.scale) {
return true;
}
}
return false;
}