1.轮播图Swiper设置圆角,在外层Container设置圆角无效
Container(
margin: EdgeInsets.only(left: 10, top: 10, right: 10),
height: 100,
child: ClipRRect(
//设置圆角
borderRadius: BorderRadius.circular(10),
child: Swiper(
itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: () {
print('点击图片');
},
child: CachedNetworkImage(
imageUrl: ('url'),
fit: BoxFit.cover,
placeholder: (context, url) =>
Image.asset('站位图',
fit: BoxFit.cover),
errorWidget: (context, url, error) =>
Image.asset('站位图',
fit: BoxFit.cover),
),
);
},
itemCount: _bannerList!.length,
controller: _swiperController,
autoplay: true,
pagination: new SwiperPagination(
builder: DotSwiperPaginationBuilder(
color: ff4d040404, //page默认颜色
activeColor: themeBackground,
size: 6,
)), //底部page
),
),
);
Text文本溢出
文本出现中文+数字的组合时 Text组件显示不全,可做以下处理
Characters('abc').join('\u{200B}');
Text(Characters('abc').join('\u{200B}')),
网友评论