代码块记录:黑色遮罩

代码块记录:黑色遮罩

narakuyang
2021-06-01 / 0 评论 / 8 阅读 / 正在检测是否收录...
Container(
                                        width: 1.sw,
                                        height: 200.h,
                                        child: ShaderMask(
                                          shaderCallback: (Rect bounds) {
                                            return LinearGradient(
                                              colors: [
                                                Colors.black.withOpacity(0.45),
                                                Colors.transparent,
                                              ],
                                              begin: Alignment.bottomCenter,
                                              end: Alignment.topCenter,
                                              stops: [0.0, 0.45],
                                              tileMode: TileMode.clamp,
                                            ).createShader(bounds);
                                          },
                                          blendMode: BlendMode.darken,
                                          child: CachedNetworkImage(
                                            imageUrl: baseinfo.bannerinfo[index]
                                                ['covers'],
                                            fit: BoxFit.cover,
                                          ),
                                        ),
                                      ),
0

评论

博主关闭了所有页面的评论