'How do I make this design? in Flutter?
Solution 1:[1]
You can use a Stack together with Positioned. Here is an example, you can adjust it to fit your needs:
Padding(
padding: const EdgeInsets.all(30),
child: Stack(
clipBehavior: Clip.none,
children: <Widget>[
Container(
color: Colors.grey,
height: 150,
width: 150,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 30,
),
Directionality(
textDirection: TextDirection.rtl,
child: Row(children: [
Text('hi'),
])),
],
),
),
Positioned(
child: Container(
margin: EdgeInsets.all(10),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text("test"),
),
decoration: BoxDecoration(
color: Colors.red, borderRadius: BorderRadius.circular(20)),
),
right: 10,
top: -20,
),
],
),
),
Result:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | MendelG |


