Answers for "float string to int dart"

1

how to convert int/int to float dart

int x = 10;   
 double a = x.toDouble();
Posted by: Guest on April-14-2021
2

string to int in dart

import 'dart:convert';

void main() {
    var a = 10; // An integer
    var b = "20"; // A string
    var c = int.parse(b);
    print(a + c);
}
Posted by: Guest on December-07-2020

Browse Popular Code Answers by Language