From 5b99507db350121e5ab52a2b075a65f0b5e8fcc5 Mon Sep 17 00:00:00 2001 From: groovinchip Date: Fri, 30 Jul 2021 11:34:46 -0400 Subject: [PATCH] test: lerp halfway from light to dark --- .../src/theme/message_input_theme_test.dart | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) 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 227cdc9c..69e9669a 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 @@ -18,6 +18,13 @@ void main() { _messageInputThemeControlDark); }); + test('Lerp halfway from light to dark', () { + expect( + const MessageInputThemeData().lerp( + _messageInputThemeControl, _messageInputThemeControlDark, 0.5), + _messageInputThemeControlMidLerp); + }); + test('Lerp completely from dark to light', () { expect( const MessageInputThemeData().lerp( @@ -56,23 +63,29 @@ final _messageInputThemeControl = MessageInputThemeData( final _messageInputThemeControlMidLerp = MessageInputThemeData( borderRadius: BorderRadius.circular(20), sendAnimationDuration: const Duration(milliseconds: 300), - actionButtonColor: ColorTheme.light().accentPrimary, - actionButtonIdleColor: ColorTheme.light().textLowEmphasis, - expandButtonColor: ColorTheme.light().accentPrimary, - sendButtonColor: ColorTheme.light().accentPrimary, - sendButtonIdleColor: ColorTheme.light().disabled, - inputBackgroundColor: ColorTheme.light().barsBg, - inputTextStyle: TextTheme.light().body, - idleBorderGradient: LinearGradient( + inputBackgroundColor: const Color(0xff87898b), + actionButtonColor: const Color(0xff005fff), + actionButtonIdleColor: const Color(0xff7a7a7a), + sendButtonColor: const Color(0xff005fff), + sendButtonIdleColor: const Color(0xff848585), + expandButtonColor: const Color(0xff005fff), + inputTextStyle: const TextStyle( + color: Color(0xff7f7f7f), + fontSize: 14, + fontWeight: FontWeight.w500, + ), + idleBorderGradient: const LinearGradient( + stops: [0.0, 1.0], colors: [ - ColorTheme.light().disabled, - ColorTheme.light().disabled, + Color(0xff848585), + Color(0xff848585), ], ), - activeBorderGradient: LinearGradient( + activeBorderGradient: const LinearGradient( + stops: [0.0, 1.0], colors: [ - ColorTheme.light().disabled, - ColorTheme.light().disabled, + Color(0xff848585), + Color(0xff848585), ], ), );