0

I want to create layout just like in instagram post description

Something like below image

enter image description here

I know i can use RichText widgets, but i want use some custom text widgets

I have tried using 2 way

First using Wrap widgets

      Wrap(
                  children: <Widget>[
                    Text(
                      'UserName',
                      style: TextStyle(fontWeight: FontWeight.bold),
                    ),
                    Text(
                      'Post description',
                      style: TextStyle(fontWeight: FontWeight.bold),
                    ),
                  ],
                )

Using Row Widgets

      Row(
                  children: <Widget>[
                    Text(
                      'UserName',
                      style: TextStyle(fontWeight: FontWeight.bold),
                    ),
                    Text(
                      'Post description',
                      style: TextStyle(fontWeight: FontWeight.bold),
                    ),
                  ],
                )

I have also tried using stack widget but not able to create

If need more information please do let me know. Thanks in advance. Your efforts will be appreciated.

Goku
  • 9,102
  • 8
  • 50
  • 81
  • Using `RichText` seems the most straightforward way, indeed. Can you clarify why you can't use that? If you have Text widgets already built and you want to re-use them, I guess you could create TextSpans using the properties from the Text widgets (i.e. Text.data and Text.style). – Luis Fernando Trivelatto Jun 18 '20 at 06:49
  • @LuisFernandoTrivelatto i'm using custom `SmartTextView` to show links, tags, and hashtags as `Post description` that's why i'm not able to use `RichText` – Goku Jun 18 '20 at 06:58

0 Answers0