forked from vikunja/app
format
This commit is contained in:
parent
61b3deb5d1
commit
19917aa171
|
@ -16,17 +16,17 @@ class LabelComponent extends StatefulWidget {
|
|||
}
|
||||
|
||||
class LabelComponentState extends State<LabelComponent> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Color backgroundColor = widget.label.color ?? vLabelDefaultColor;
|
||||
Color textColor = backgroundColor.computeLuminance() > 0.5 ? vLabelDark : vLabelLight;
|
||||
Color textColor =
|
||||
backgroundColor.computeLuminance() > 0.5 ? vLabelDark : vLabelLight;
|
||||
|
||||
return Chip(
|
||||
label: Text(
|
||||
widget.label.title,
|
||||
style: TextStyle(
|
||||
color: textColor ,
|
||||
color: textColor,
|
||||
),
|
||||
),
|
||||
backgroundColor: backgroundColor,
|
||||
|
|
|
@ -233,13 +233,17 @@ class _TaskEditPageState extends State<TaskEditPage> {
|
|||
spacing: 10,
|
||||
children: <Widget>[
|
||||
LabelComponent(
|
||||
label: Label(id: 12134, title: 'Lorem Ipsum', color: Color(0xFFe8e8e8)),
|
||||
label: Label(
|
||||
id: 12134,
|
||||
title: 'Lorem Ipsum',
|
||||
color: Color(0xFFe8e8e8)),
|
||||
onDelete: () {
|
||||
print('deleted');
|
||||
},
|
||||
),
|
||||
LabelComponent(
|
||||
label: Label(id: 12134, title: 'Lorem Ipsum Dolor sit amet'),
|
||||
label: Label(
|
||||
id: 12134, title: 'Lorem Ipsum Dolor sit amet'),
|
||||
),
|
||||
LabelComponent(
|
||||
label: Label(id: 12134, title: 'Ipsum'),
|
||||
|
|
Loading…
Reference in New Issue