body: Container( decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Colors.green, Colors.blue]) ), child: Center( child: Text('Gradients are cool!', style: TextStyle( fontSize: 35, color: Colors.white, ), ), ), ),
appBar: AppBar( title: Text('Flutter Demo'), flexibleSpace: Container( decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.centerLeft, end: Alignment.centerRight, colors: <Color>[ Colors.red, Colors.blue ], ), ), ), ),
body: Container( decoration: BoxDecoration( gradient: LinearGradient( colors: [Colors.green, Colors.blue]) ), child: Center( child: Text('Gradients are cool!', style: TextStyle( fontSize: 35, color: Colors.white, ), ), ), ),