forked from anncode1/Curso-de-Flutter-Avanzado-en-Platzi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgradient_back.dart
44 lines (34 loc) · 875 Bytes
/
gradient_back.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import 'package:flutter/material.dart';
class GradientBack extends StatelessWidget {
String title = "Popular";
GradientBack(this.title);
@override
Widget build(BuildContext context) {
// TODO: implement build
return Container(
height: 250.0,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Color(0xFF4268D3),
Color(0xFF584CD1)
],
begin: FractionalOffset(0.2, 0.0),
end: FractionalOffset(1.0, 0.6),
stops: [0.0, 0.6],
tileMode: TileMode.clamp
)
),
child: Text(
title,
style: TextStyle(
color: Colors.white,
fontSize: 30.0,
fontFamily: "Lato",
fontWeight: FontWeight.bold
),
),
alignment: Alignment(-0.9, -0.6),
);
}
}