tryParse function
Tries to parse the provided value
as int.
If the provided value
is a String then parses it as hexadecimal.
Implementation
int? tryParse(dynamic value) {
switch (value.runtimeType) {
case const (int):
{
return value;
}
case const (String):
{
return int.tryParse(value, radix: 16);
}
default:
{
return null;
}
}
}