Am trying to make two container with border line but when I implemented the parent border line and child container line is not drawing on the same line please refer this pic [![enter image description here][1]][1]
Following is the code
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Container(
decoration: BoxDecoration(
color: Colors.white70,
border: Border.fromBorderSide(
BorderSide(
color: Colors.red,
),
),
borderRadius: const BorderRadius.all(Radius.circular(8)),
),
child: Row(children: [
Container(
decoration: BoxDecoration(
color: Colors.white70,
border: Border.fromBorderSide(
BorderSide(
color: Colors.red,
),
),
borderRadius: const BorderRadius.all(Radius.circular(8)),
),
child: Expanded(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Text('data1'),
)),
)
]),
),
));
}
Any help , thanks in advance.
[1]: https://phpout.com/wp-content/uploads/2023/07/TAuwh.png
2
Answers
you can use stack to implementation.
like this code