我想在标记上添加这个自定义小部件。我已经设计好了这个小部件,但是我不知道如何将其定位到标记上。
我该如何自定义它以始终出现在信息窗口位置。它被包裹在一个定位小部件中,但是我无法将其放置在信息窗口位置。
Stack(
children: [
AnimatedPositioned(
bottom: 0.0,
duration: Duration(milliseconds: 200),
child: Container(
padding: EdgeInsets.only(top:
30,left: 15,
right: 15,bottom: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topRight: Radius.circular(0),
topLeft: Radius.circular(0),
bottomRight: Radius.circular(5),
bottomLeft: Radius.circular(5))),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
'500 USD',
style: TextStyle(
fontWeight: FontWeight.w600,
fontFamily: 'Roboto',
color: customBlue,
fontSize: _sizeConfig.textSize(
context,
Converters.configSize(14),
),
),
),
SizedBox(
height: 10,
),
RatingBar.builder(
initialRating: 3.5,
unratedColor: Colors.grey
.withOpacity(0.5),
minRating: 1,
allowHalfRating: true,
itemSize: 20,
direction: Axis.horizontal,
itemCount: 5,
itemPadding: EdgeInsets.symmetric(horizontal: 0.0),
itemBuilder: (context, _) => Icon(
Icons.star,
color: customRed,
),
),
],
),
width: 163,
),
)
],
),