forked from vikunja/app
Started creating the color
This commit is contained in:
parent
45eb087228
commit
714aed4603
|
@ -1,17 +1,20 @@
|
|||
import 'dart:ui';
|
||||
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:vikunja_app/models/user.dart';
|
||||
|
||||
class Label {
|
||||
final int id;
|
||||
final String title, description, hexColor;
|
||||
final String title, description;
|
||||
final DateTime created, updated;
|
||||
final User createdBy;
|
||||
final Color color;
|
||||
|
||||
Label(
|
||||
{@required this.id,
|
||||
this.title,
|
||||
this.description,
|
||||
this.hexColor,
|
||||
this.color,
|
||||
this.created,
|
||||
this.updated,
|
||||
this.createdBy});
|
||||
|
@ -20,7 +23,7 @@ class Label {
|
|||
: id = json['id'],
|
||||
title = json['title'],
|
||||
description = json['description'],
|
||||
hexColor = json['hex_color'],
|
||||
color = new Color(int.parse(json['hex_color'], radix: 16) + 0xFF000000),
|
||||
updated = DateTime.fromMillisecondsSinceEpoch(json['updated']),
|
||||
created = DateTime.fromMillisecondsSinceEpoch(json['created']),
|
||||
createdBy = User.fromJson(json['created_by']);
|
||||
|
@ -29,7 +32,7 @@ class Label {
|
|||
'id': id,
|
||||
'title': title,
|
||||
'description': description,
|
||||
'hex_color': description,
|
||||
'hex_color': color.toString(),
|
||||
'created_by': createdBy?.toJSON(),
|
||||
'updated': updated?.millisecondsSinceEpoch,
|
||||
'created': created?.millisecondsSinceEpoch,
|
||||
|
|
Loading…
Reference in New Issue