this code I have written which end like this one
code :
Container(
margin: const EdgeInsets.only(
left: 8, right: 8, bottom: 10),
padding: const EdgeInsets.symmetric(
horizontal: 12, vertical: 10),
decoration: BoxDecoration(
color: whiteTextColor,
borderRadius: BorderRadius.circular(4),
boxShadow: const [
BoxShadow(
color: shadowColor,
blurRadius: 5,
offset: Offset(0, 3),
spreadRadius: 0,
)
]),
child: Column(
children: [
Row(
children: [
retailer.profilePic == null ||
retailer.profilePic == ”
? Container(
alignment: Alignment.center,
width: 36,
height: 36,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
border: Border.all(
color: primaryColor),
),
child: TextWidget(
retailer.retailerName?[0]
.toUpperCase() ??
“”,
size: 18,
),
)
: Container(
width: 36,
height: 36,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
image: DecorationImage(
image: NetworkImage(
“${retailer.profilePic}”),
),
),
),
const SizedBox(
width: 9,
),
SizedBox(
width: getWidth(1, context) – 186,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
TextWidget(
‘${retailer.retailerName}’ ??
“NA”,
size: 14,
weight: FontWeight.w400,
overflow:
TextOverflow.visible,
color: blackTextColor,
),
Row(
children: [
TextWidget(
“${retailer.routeCode}”,
size: 12,
weight: FontWeight.w300,
overflow:
TextOverflow.visible,
color:
blackLightTextColor,
),
const SizedBox(
width: 10,
),
],
),
],
),
),
const Spacer(
flex: 2,
),
Row(
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Container(
height: 32,
width: 32,
decoration:
const ShapeDecoration(
color: whiteTextColor,
shadows: [
BoxShadow(
color: shadowColor,
blurRadius: 4,
offset: Offset(0, 2),
spreadRadius: 0,
)
],
shape: OvalBorder(),
),
child: IconButton(
onPressed: () {
MapUtils.openMap(
retailer.lat ?? 0.00,
retailer.lng ?? 0.00,
context,
“${retailer.retailerName ?? “NA”}”,
);
},
icon: SvgPicture.asset(
“assets/icons/location.svg”,
height: 24,
width: 24,
fit: BoxFit.fill,
),
),
),
],
),
const SizedBox(
width: 10,
),
Container(
height: 32,
width: 32,
decoration:
const ShapeDecoration(
color: whiteTextColor,
shadows: [
BoxShadow(
color: shadowColor,
blurRadius: 4,
offset: Offset(0, 2),
spreadRadius: 0,
)
],
shape: OvalBorder(),
),
child: IconButton(
onPressed: () async {
final url = Uri(
scheme: “tel”,
path:
“${retailer?.phone}”);
if (await canLaunchUrl(
url)) {
launchUrl(url);
}
},
icon: SvgPicture.asset(
“assets/icons/call.svg”,
height: 24,
width: 24,
fit: BoxFit.fill,
),
),
),
],
),
],
),
const SizedBox(
height: 8,
),
],
),
)
result: here is image what my code rendered.
(https://i.sstatic.net/XPsfWTcg.jpg)
This what I wanted to achieve : (https://i.sstatic.net/VChr9fJt.png)
Vaibhav.C is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.