toSatoshiValue function
- num val
Implementation
int toSatoshiValue(num val) {
final value_s = val.toString();
final splits = value_s.split('.');
if (splits.length == 2) {
final intPart = splits[0];
var decPart = splits[1];
decPart = decPart.padRight(8, '0');
return int.parse(intPart + decPart);
}
return (val * 1E8).toInt();
}