Conversión de tipos. ++toString();++ sirve para convertir valores numéricos a valores de tipo String. ++int.parse(variable string);++ sirve para convertir valores String a valores tipo int. ++double.parse(variable string);++ sirve para convertir valores String a valores tipo double.
<
void main() {
int numero_uno = 24;
String texto_uno = numero_uno.toString();
print (texto_uno);
String texto_dos = "12";
int numero_dos = int.parse(texto_dos);
print(numero_dos);
String texto_tres ="12.5";
double numero_tres = double.parse(texto_tres);
print(numero_tres);
}
>
