原文地址
https://cloud.tencent.com/developer/article/1922901?from=15425&areaSource=102001.1&traceId=kVqTnqR-Y_ByJsXp_UvcH
扇形渐变
// An highlighted block
Container(
height: 300,
width: 300,
decoration: BoxDecoration(
gradient: SweepGradient(
colors: [Colors.blue, Colors.yellow])),
),
放射状渐变
// An highlighted block
Container(
height: 300,
width: 300,
decoration: BoxDecoration(
gradient: RadialGradient(
colors: [Colors.blue, Colors.yellow])),
),
线性渐变
// An highlighted block
Container(
height: 300,
width: 300,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.blue, Colors.yellow)),
),