I want to convert sting to double , here my double is saperated by comma, So how to do it?
void main() {
var myInt = int.parse('12345');
assert(myInt is int);
print(myInt); // 12345
print(myInt.runtimeType); // int
var myDouble = double.parse('1,230.45');
assert(myInt is double);
print(myDouble);
print(myDouble.runtimeType); // double
}
,
first to parse it as double:var myDouble = double.parse('1,230.45'.replaceAll(',', ''));