-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbutton.dart
40 lines (37 loc) · 1.16 KB
/
button.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
import 'package:flutter/material.dart';
class RetroButton extends StatefulWidget {
final IconData icon;
final Function onPress;
final double width;
final double height;
RetroButton({this.icon, this.onPress,this.width=50,this.height=30});
@override
_RetroButtonState createState() => _RetroButtonState();
}
class _RetroButtonState extends State<RetroButton> {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: widget.onPress,
child: Container(
width: widget.width,
height: widget.height,
decoration: BoxDecoration(
color: Color(0xFFBDCED6),
border: Border(
top: BorderSide(width: 1, color: Color(0xFFFFFFFF)),
left: BorderSide(width: 1, color: Color(0xFFFFFFFF)),
right: BorderSide(width: 2, color: Color(0xFF000000)),
bottom: BorderSide(width: 2, color: Color(0xFF000000)),
)),
child: Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
Icon(
widget.icon,
size: 24,
color: Color(0xff687582),
),
]),
),
);
}
}