From 4cb85d15c4ad9432e43f703b9d7d0ee070d6c4d5 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 19 May 2023 21:52:49 +0530 Subject: [PATCH] chore: fix tests Signed-off-by: xsahil03x --- .../lib/src/theme/message_theme.dart | 20 +++++++++++-------- .../src/theme/message_input_theme_test.dart | 6 +++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/stream_chat_flutter/lib/src/theme/message_theme.dart b/packages/stream_chat_flutter/lib/src/theme/message_theme.dart index d1bb911a..6c35c5e3 100644 --- a/packages/stream_chat_flutter/lib/src/theme/message_theme.dart +++ b/packages/stream_chat_flutter/lib/src/theme/message_theme.dart @@ -1,3 +1,5 @@ +import 'dart:ui'; + import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:stream_chat_flutter/src/theme/avatar_theme.dart'; @@ -185,14 +187,16 @@ class StreamMessageThemeData with Diagnosticable { b.urlAttachmentTitleStyle, t, ), - urlAttachmentTitleMaxLine: IntTween( - begin: a.urlAttachmentTitleMaxLine, - end: b.urlAttachmentTitleMaxLine, - ).lerp(t), - urlAttachmentTextMaxLine: IntTween( - begin: a.urlAttachmentTextMaxLine, - end: b.urlAttachmentTextMaxLine, - ).lerp(t), + urlAttachmentTitleMaxLine: lerpDouble( + a.urlAttachmentTitleMaxLine, + b.urlAttachmentTitleMaxLine, + t, + )?.round(), + urlAttachmentTextMaxLine: lerpDouble( + a.urlAttachmentTextMaxLine, + b.urlAttachmentTextMaxLine, + t, + )?.round(), ); } diff --git a/packages/stream_chat_flutter/test/src/theme/message_input_theme_test.dart b/packages/stream_chat_flutter/test/src/theme/message_input_theme_test.dart index 3c62baea..f267d388 100644 --- a/packages/stream_chat_flutter/test/src/theme/message_input_theme_test.dart +++ b/packages/stream_chat_flutter/test/src/theme/message_input_theme_test.dart @@ -69,11 +69,11 @@ final _messageInputThemeControlMidLerp = StreamMessageInputThemeData( borderRadius: BorderRadius.circular(20), sendAnimationDuration: const Duration(milliseconds: 300), inputBackgroundColor: const Color(0xff87898b), - actionButtonColor: const Color(0xff005fff), + actionButtonColor: const Color(0xff196eff), actionButtonIdleColor: const Color(0xff7a7a7a), - sendButtonColor: const Color(0xff005fff), + sendButtonColor: const Color(0xff196eff), sendButtonIdleColor: const Color(0xff848585), - expandButtonColor: const Color(0xff005fff), + expandButtonColor: const Color(0xff196eff), inputTextStyle: const TextStyle( color: Color(0xff7f7f7f), fontSize: 14,