int parseUVIndex(String value, int len) { final index = int.parse(value, radix: 10); return (index >= 0 ? index - 1 : index + len ~/ 2) * 2; }