mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-05-23 07:56:28 +08:00
added gradient to using_gradient example
This commit is contained in:
@ -13,12 +13,20 @@ void main() {
|
|||||||
),
|
),
|
||||||
// Body
|
// Body
|
||||||
body: new Container(
|
body: new Container(
|
||||||
// Center the content
|
// Center the content
|
||||||
child: new Center(
|
child: new Center(
|
||||||
// Add Text
|
// Add Text
|
||||||
child: new Text(
|
child: new Text(
|
||||||
"Hello World!",
|
"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),
|
||||||
|
)))));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user