toNum static method
Takes a value typically a String and if its numeric parsed will output a num
Implementation
static num? toNum(dynamic s)
{
try
{
if (s == null || s == '' || s == 'null') return null;
if (s is num) return s;
if (s is String) return num.parse(s);
return toNum(s.toString());
}
catch(e)
{
return null;
}
}