added gradient to using_gradient example

This commit is contained in:
Nishant Srivastava
2017-09-29 22:47:15 -07:00
parent 5846cca07a
commit 5b7434fb2a

View File

@ -13,12 +13,20 @@ void main() {
),
// Body
body: new Container(
// Center the content
child: new Center(
// Add Text
child: new Text(
"Hello World!",
// Center the content
child: new Center(
// Add Text
child: new Text(
"Hello World!",
),
),
),
))));
decoration: new BoxDecoration(
// Add Gradient
gradient: new LinearGradient(
colors: [Colors.lightBlueAccent, Colors.blueAccent],
begin: const FractionalOffset(0.0, 0.0),
end: const FractionalOffset(0.6, 0.0),
stops: [0.0, 0.6],
tileMode: TileMode.clamp),
)))));
}