hexToInt method
Hex string to integer, a value of null indicates an error. The string must start with 0x
Implementation
static int hexToInt(String val) {
final int temp = int.tryParse(val);
if (temp == null) {
return null;
}
return temp;
}