16进制转int
static int hexToInt(String hex) { return int.tryParse(hex.replaceAll('0x', ''), radix: 16) ?? 0; }