chore: add diagnosticable properties to channel_preview_theme.dart

This commit is contained in:
groovinchip
2021-07-30 13:48:49 -04:00
parent f55110c458
commit 008dc0b1df
@@ -1,8 +1,9 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/src/theme/avatar_theme.dart';
/// Theme for channel preview
class ChannelPreviewTheme {
class ChannelPreviewTheme with Diagnosticable {
/// Constructor for creating [ChannelPreviewTheme]
const ChannelPreviewTheme({
this.titleStyle,
@@ -62,4 +63,15 @@ class ChannelPreviewTheme {
unreadCounterColor: other.unreadCounterColor,
);
}
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties
..add(DiagnosticsProperty('titleStyle', titleStyle))
..add(DiagnosticsProperty('subtitleStyle', subtitleStyle))
..add(DiagnosticsProperty('lastMessageAtStyle', lastMessageAt))
..add(DiagnosticsProperty('avatarTheme', avatarTheme))
..add(ColorProperty('unreadCounterColor', unreadCounterColor));
}
}