by @kodeazy

flutter how to convert number to string in dart file?

Home » flutter » flutter how to convert number to string in dart file?
  • To convert Integer to String in dart file we use toString() method.
void main() {
  int numberToconvertString = 10;
  String convertedVariable = numberToconvertString.toString();
  print(convertedVariable is int);
}

Prints true because variable was converted to String.

Output:

true