added hashCode to LineSegment
now using unorderedEquals instead of comparing sets
removed unused dart:async import; replaced dart:json with dart:convert