代码如下:
Widget main(){ return Container( height: 100.0, width: double.infinity, child: new Text("data"), decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ Colors.amberAccent, Colors.white, ], ), ), ); }
效果如下:
文章评论