Skip to content

Commit

Permalink
Complete remaining Event's and BasicEvent's debugFillProperties(…)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasWanke committed Aug 19, 2022
1 parent 32b5f41 commit c3a15e9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/src/event/basic.dart
@@ -1,4 +1,5 @@
import 'package:black_hole_flutter/black_hole_flutter.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import 'all_day.dart';
Expand Down Expand Up @@ -59,6 +60,14 @@ class BasicEvent extends Event {
super == other &&
title == other.title &&
backgroundColor == other.backgroundColor;

@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties.add(DiagnosticsProperty('id', id));
properties.add(StringProperty('title', title));
properties.add(ColorProperty('backgroundColor', backgroundColor));
}
}

/// A simple [Widget] for displaying a [BasicEvent].
Expand Down
6 changes: 6 additions & 0 deletions lib/src/event/event.dart
Expand Up @@ -27,6 +27,12 @@ abstract class Event with Diagnosticable {
super.debugFillProperties(properties);
properties.add(DiagnosticsProperty('start', start));
properties.add(DiagnosticsProperty('end', end));
properties.add(FlagProperty(
'isAllDay',
value: isAllDay,
ifTrue: 'all-day',
ifFalse: 'part-day',
));
}
}

Expand Down

0 comments on commit c3a15e9

Please sign in to comment.