mirror of
https://github.com/go-vikunja/app
synced 2024-06-02 18:49:47 +00:00
make Task.identifier non-nullable
This commit is contained in:
parent
858fff8420
commit
8191c83c36
|
@ -57,8 +57,8 @@ class _BucketTaskCardState extends State<BucketTaskCard> with AutomaticKeepAlive
|
|||
final identifierRow = Row(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
(widget.task.identifier?.isNotEmpty ?? false)
|
||||
? '#${widget.task.identifier!.substring(1)}' : '${widget.task.id}',
|
||||
widget.task.identifier.isNotEmpty
|
||||
? '#${widget.task.identifier.substring(1)}' : '${widget.task.id}',
|
||||
style: (theme.textTheme.subtitle2 ?? TextStyle()).copyWith(
|
||||
color: Colors.grey,
|
||||
),
|
||||
|
|
|
@ -14,7 +14,7 @@ class Task {
|
|||
late final DateTime created, updated;
|
||||
final DateTime? dueDate, startDate, endDate;
|
||||
final List<DateTime> reminderDates;
|
||||
final String? identifier;
|
||||
final String identifier;
|
||||
final String title, description;
|
||||
final bool done;
|
||||
final Color? color;
|
||||
|
@ -33,7 +33,7 @@ class Task {
|
|||
|
||||
Task({
|
||||
this.id = -1,
|
||||
this.identifier,
|
||||
this.identifier = '',
|
||||
this.title = '',
|
||||
this.description = '',
|
||||
this.done = false,
|
||||
|
@ -109,7 +109,7 @@ class Task {
|
|||
'id': id != -1 ? id : null,
|
||||
'title': title,
|
||||
'description': description,
|
||||
'identifier': identifier,
|
||||
'identifier': identifier.isNotEmpty ? identifier : null,
|
||||
'done': done,
|
||||
'reminder_dates': reminderDates
|
||||
.map((date) => date.toUtc().toIso8601String())
|
||||
|
|
Loading…
Reference in New Issue
Block a user