Current output:
Expected output:
Code:
Align(
alignment: Alignment.topRight,
child: Container(
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 20),
margin: EdgeInsets.only(right: 12, top: 8),
decoration: BoxDecoration(
color: Color(0xFF486993),
borderRadius: BorderRadius.all(Radius.circular(20)),
),
child: Text("This is my message"),
),
)
3
Answers
Here you are:
You will have to change
paint
method, because now it’s just a triangle.Otherwise, it looks as you requested.
Trying to recreate Telegram layout myself I came up with this to make the shape;
Here is what exactly needed to create neat speech bubble in flutter.
first create a custom painter class that extends Painter class
then use it in your chat screen. please note that this screen for only demo purpose so you can modify it according to your needs.
this is how it looks;