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

Add Text in a new Row in Flutter

Hi I am trying to add a new in container in the Flutter Project:

Here is layout:

Container(
                  decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(10),
                      color: const Color(0xFFF4F6FD)),
                  padding:
                      const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
                  child: Row(
                    children: [
                      Text(
                        "Last Details:",
                        style: Styles.textStyle,
                      ),
                      Text(
                        "Date",
                        style: Styles.textStyle,
                      ),
                    ],
                  ),
                )
              ],
            ),
          )

Here is the current situation:

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

enter image description here

This is the required outcome:

enter image description here

My question:

Where can I add the following text to show right below the existing text:

                      Text(
                        "Some Text",
                      ),

>Solution :

Wrap the Row widget with Column widget. Add your text in children of Column.

New code will look like:

    Container(
                      decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(10),
                          color: const Color(0xFFF4F6FD)),
                      padding:
                          const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
                      child:Column(
                children:[
                      Row(
                        children: [
                          Text(
                            "Last Details:",
                            style: Styles.textStyle,
                          ),
                          Text(
                            "Date",
                            style: Styles.textStyle,
                          ),
                        ],
                      ),
                     

                  Text(
                    "Some Text",
                  ),
                  ],

                ),
              )
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