Для этого вы можете использовать Column()
и добавить два Containers()
для одного текста сообщения с приведенными ниже спецификациями кода
Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
//this is first container
Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white),
borderRadius: BorderRadius.circular(10.0)
),
child: Padding(
padding: EdgeInsets.all(10.0),
child: Text("This is the dummy text for", style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold))
)
),
//this is second container
Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white),
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(10.0), bottomRight: Radius.circular(10.0))
),
child: Padding(
padding: EdgeInsets.all(10.0),
child: Text("post 1", style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold))
)
)
]
)
Результат
введите описание изображения здесь