-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathtaskCard.dart
31 lines (28 loc) · 922 Bytes
/
taskCard.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
import 'package:flutter/material.dart';
class CategoryButton extends StatefulWidget {
final String title;
final Color color;
final bool selected;
CategoryButton({Key key, this.title, this.color, this.selected }) : super(key: key);
@override
_CategoryButtonState createState() => _CategoryButtonState();
}
class _CategoryButtonState extends State<CategoryButton> {
@override
Widget build(BuildContext context) {
return Container(
// margin: EdgeInsets.symmetric(horizontal: 12.0),
child: RaisedButton(
child: new Text(widget.title, style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 14.0,
color: widget.selected ? Colors.white : Colors.black87,
letterSpacing: 1.0,
fontFamily: 'OpenSansSemiBold',
),),
elevation: 0.0,
color: widget.selected ? widget.color : Colors.grey.shade50,
),
);
}
}