chore: use ChannelHeaderTheme.of(context) in thread_header.dart
This commit is contained in:
@@ -104,7 +104,7 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final chatThemeData = StreamChatTheme.of(context);
|
final channelHeaderTheme = ChannelHeaderTheme.of(context);
|
||||||
|
|
||||||
final defaultSubtitle = subtitle ??
|
final defaultSubtitle = subtitle ??
|
||||||
Row(
|
Row(
|
||||||
@@ -113,11 +113,11 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'${context.translations.withText} ',
|
'${context.translations.withText} ',
|
||||||
style: chatThemeData.channelHeaderTheme.subtitleStyle,
|
style: channelHeaderTheme.subtitleStyle,
|
||||||
),
|
),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: ChannelName(
|
child: ChannelName(
|
||||||
textStyle: chatThemeData.channelHeaderTheme.subtitleStyle,
|
textStyle: channelHeaderTheme.subtitleStyle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -136,7 +136,7 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
showUnreads: true,
|
showUnreads: true,
|
||||||
)
|
)
|
||||||
: const SizedBox()),
|
: const SizedBox()),
|
||||||
backgroundColor: chatThemeData.channelHeaderTheme.color,
|
backgroundColor: channelHeaderTheme.color,
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
actions: actions,
|
actions: actions,
|
||||||
title: InkWell(
|
title: InkWell(
|
||||||
@@ -150,14 +150,14 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
title ??
|
title ??
|
||||||
Text(
|
Text(
|
||||||
context.translations.threadReplyLabel,
|
context.translations.threadReplyLabel,
|
||||||
style: chatThemeData.channelHeaderTheme.titleStyle,
|
style: channelHeaderTheme.titleStyle,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
if (showTypingIndicator)
|
if (showTypingIndicator)
|
||||||
TypingIndicator(
|
TypingIndicator(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
channel: StreamChannel.of(context).channel,
|
channel: StreamChannel.of(context).channel,
|
||||||
style: chatThemeData.channelHeaderTheme.subtitleStyle,
|
style: channelHeaderTheme.subtitleStyle,
|
||||||
parentId: parent.id,
|
parentId: parent.id,
|
||||||
alternativeWidget: defaultSubtitle,
|
alternativeWidget: defaultSubtitle,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user