美文网首页flutter
Flutter之LinearGradient组件

Flutter之LinearGradient组件

作者: 习惯了_就好 | 来源:发表于2021-03-31 09:21 被阅读0次
/**
可以实现背景颜色渐变
 * const LinearGradient({
    this.begin = Alignment.centerLeft,
    this.end = Alignment.centerRight,
    @required List<Color> colors,//颜色取值
    List<double> stops,
    this.tileMode = TileMode.clamp,
    GradientTransform transform,
  })
*/
decoration: BoxDecoration(
                    gradient: LinearGradient(
                        colors: [Color(HexColor.getColorFromHex(info['classifycolorright'])), Color(HexColor.getColorFromHex(info['classifycolor']))]
                    )
                ),

相关文章

网友评论

    本文标题:Flutter之LinearGradient组件

    本文链接:https://www.haomeiwen.com/subject/ktleektx.html