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:
This is the required outcome:
My question:
Where can I add the following text to show right below the existing text:
Text(
"Some Text",
),
CodePudding user response:
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",
),
],
),
)