So I have an svg and some multiline text that I want to horizontally align but the catch is from the next line the text should cover the bottom area of the svg, how to do it in flutter?
I have tried this :
Padding(
padding: const EdgeInsets.only(
left: 16.0, right: 16, bottom: 16),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(ImageConstant.verifiedMarker),
Expanded(
child: Text(
trip.formattedAddress,
softWrap: true,
textAlign: TextAlign.start,
style:
theme.textTheme.bodyMedium?.copyWith(height: 1.5),
),
),
],
),
),
Try This
Padding(
padding: const EdgeInsets.all(16.0),
child: RichText(
text: TextSpan(
children: [
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: SvgPicture.asset(
'assets/icon.svg',
width: 20,
height: 20,
),
),
TextSpan(
text:
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
style: TextStyle(fontSize: 16, color: Colors.black),
),
],
),
),
)
output :