// String -> double
main () {
var onePointOne = double.parse('1.1');
print(onePointOne == 1.1); // prints true
}
void main() {
int n1 = 2;
var value = n1.toDouble();
print("Output = ${value}");
}
var long2 = double.parse("STRING");
// String -> double
main () {
var onePointOne = double.parse('1.1');
print(onePointOne == 1.1); // prints true
}
// String -> int
var one = int.parse('1');
assert(one == 1);
// String -> double
var onePointOne = double.parse('1.1');
assert(onePointOne == 1.1);
// int -> String
String oneAsString = 1.toString();
assert(oneAsString == '1');
// double -> String
String piAsString = 3.14159.toStringAsFixed(2);
assert(piAsString == '3.14');
// String -> int
var one = int.parse('1');
assert(one == 1);
// String -> double
var onePointOne = double.parse('1.1');
assert(onePointOne == 1.1);
// int -> String
String oneAsString = 1.toString();
assert(oneAsString == '1');
// double -> String
String piAsString = 3.14159.toStringAsFixed(2);
assert(piAsString == '3.14');
var myInt = int.parse('12345');
assert(myInt is int);
print(myInt); // 12345
String t = '5,000';
double f = double.parse(t.replaceAll(',',''));
print(f);