使用toString
和/或toRadixString
int intValue = 1;
String stringValue = intValue.toString();
String hexValue = intValue.toRadixString(16);
或者,如在纪念中
String anotherValue = 'the value is $intValue';
Flutter将int变量转换为字符串
使用toString
和/或toRadixString
int intValue = 1;
String stringValue = intValue.toString();
String hexValue = intValue.toRadixString(16);
或者,如在纪念中
String anotherValue = 'the value is $intValue';