I need to remove the space between two or more Text widgets in a Row.
This is the code using a Row
Row(
mainAxisAlignment: MainAxisAlignment.start,
// textBaseline: TextBaseline.alphabetic,
// crossAxisAlignment: CrossAxisAlignment.baseline,
children: [
Text(
r'$ ' formatNumber(valueText),
style: TextStyle(
color: Color(0xff210049),
fontSize: smallTextSize,
fontFamily: 'RedHat',
),
),
Text(
',00',
style: TextStyle(
color: Color(0xff210049),
fontSize: smallTextSize,
fontFamily: 'RedHat',
),
),
],
),
I also tried using a RichText, but the result is the same:
RichText(
text: TextSpan(
text: r'$ ' formatNumber(valueText),
style: TextStyle(
color: Color(0xff210049),
fontSize: smallTextSize,
fontFamily: 'RedHat',
),
children: <TextSpan>[
TextSpan(
text: ',00',
style: TextStyle(
color: Color(0xff210049),
fontSize: smallTextSize,
fontFamily: 'RedHat',
),
),
],
),
),
The last line in the image is an examlpe of what I need to get
CodePudding user response:
I really don't understand. you need to remove the spaces only. then just delete the space after $ sign
Text(
r'$' '333 '.trim(),
style: TextStyle(
color: Color(0xff210049),
//fontSize: smallTextSize,
fontFamily: 'RedHat',
),
),