flutter Container背景色渐变

Container背景色渐变

 Container(
      child: Text('下一页'),
      decoration: BoxDecoration(
        gradient: LinearGradient(
          begin: Alignment.topLeft,
          end: Alignment.bottomRight,
          colors: [
            Colors.pinkAccent,
            Colors.white,
          ],
        ),
      ),
    );

推荐阅读更多精彩内容