forked from anncode1/Curso-de-Flutter-Avanzado-en-Platzi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbutton_purple.dart
61 lines (50 loc) · 1.26 KB
/
button_purple.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import 'package:flutter/material.dart';
class ButtonPurple extends StatelessWidget {
String buttonText = "Navigate";
ButtonPurple(this.buttonText);
@override
Widget build(BuildContext context) {
// TODO: implement build
return InkWell(
onTap: () {
Scaffold.of(context).showSnackBar(
SnackBar(
content: Text("Navegando"),
)
);
},
child: Container(
margin: EdgeInsets.only(
top: 30.0,
left: 20.0,
right: 20.0
),
height: 50.0,
width: 180.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.0),
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: Center(
child: Text(
buttonText,
style: TextStyle(
fontSize: 18.0,
fontFamily: "Lato",
color: Colors.white
),
),
),
),
);
}
}