Home > Software design >  How to convert Integer value into String value in flutter(dart)
How to convert Integer value into String value in flutter(dart)

Time:03-16

in my project, I needed one functionality that, they convert integer numbers into a string value, example:- if I enter text field value is 200

so after the button click, I need to convert this integer value(200) into the English name of this integer value.
that is two hundred So after the button click, I need this text two hundred if the user fills integer value into the text field. is there any package or dart method available for this task?

CodePudding user response:

I use this package for this purpose:

https://pub.dev/packages/number_to_character

CodePudding user response:

// String to int

String s = "45";
int i = int.parse(s);

// int to String

int j = 45;
String t = "$j";
  • Related