Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Remove space between widgets in row flutter

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:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

          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

enter image description here

>Solution :

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',
              ),
            ),
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading