Source
Gauge(this.bitmapData, [this.direction = DIRECTION_LEFT]) { var validDirection = false; validDirection = validDirection || direction == DIRECTION_UP; validDirection = validDirection || direction == DIRECTION_DOWN; validDirection = validDirection || direction == DIRECTION_LEFT; validDirection = validDirection || direction == DIRECTION_RIGHT; if (!validDirection) throw new ArgumentError('Invalid Gauge direction!'); }