How to align text in RichText area in Flutter?

Viewed 76
RichText(
          text: TextSpan(
                   text: '•   ',                                            
          
                   children: <TextSpan>[
                      TextSpan(text: list2[1],),
                   ],
          ),       
),

Here I want the text: '• ' to have left-center alignment.

What is the way to achieve that?

1 Answers

try with Align

Align(
              alignment: Alignment.centerLeft,
              child: RichText(
                text: TextSpan(
                  text: '.  ',
                  style: TextStyle(color: Colors.black),
                  children: <TextSpan>[
                    TextSpan(text: list2[1],),
                  ],
                ),
              ),
            ),
Related