From 008dc0b1df909e7a13af64a8fdff4aeb78dcbd2b Mon Sep 17 00:00:00 2001 From: groovinchip Date: Fri, 30 Jul 2021 13:48:49 -0400 Subject: [PATCH] chore: add diagnosticable properties to channel_preview_theme.dart --- .../lib/src/theme/channel_preview_theme.dart | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/stream_chat_flutter/lib/src/theme/channel_preview_theme.dart b/packages/stream_chat_flutter/lib/src/theme/channel_preview_theme.dart index bb7a638f..af3b35b5 100644 --- a/packages/stream_chat_flutter/lib/src/theme/channel_preview_theme.dart +++ b/packages/stream_chat_flutter/lib/src/theme/channel_preview_theme.dart @@ -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)); + } }