magicCompare method
Compares the value with another value.
other: The value to compare with. Returns an integer less than, equal to, or greater than zero if this value is less than, equal to, or greater than the other value, respectively.
Implementation
int magicCompare(dynamic other) {
if (this is Comparable && other is Comparable) {
return (this as Comparable).compareTo(other);
}
return 0;
}