From 9f261f0b3da454db4724ac9b2373884bd020eb8f Mon Sep 17 00:00:00 2001 From: adrianoct42 Date: Mon, 1 Jul 2024 18:56:01 -0300 Subject: [PATCH 01/10] feat: DSRequestReceptiveCall basic structure created --- ..._request_receptive_call_bubble.widget.dart | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lib/src/widgets/chat/ds_request_receptive_call_bubble.widget.dart diff --git a/lib/src/widgets/chat/ds_request_receptive_call_bubble.widget.dart b/lib/src/widgets/chat/ds_request_receptive_call_bubble.widget.dart new file mode 100644 index 00000000..2acbce35 --- /dev/null +++ b/lib/src/widgets/chat/ds_request_receptive_call_bubble.widget.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; + +import '../../enums/ds_align.enum.dart'; +import '../../enums/ds_border_radius.enum.dart'; +import '../../models/ds_message_bubble_style.model.dart'; + +class DSRequestReceptiveCall extends StatefulWidget { + final Color backgroundColor; + final Color foregroundColor; + final List borderRadius; + final EdgeInsets bodyPadding; + final DSAlign align; + final DSMessageBubbleStyle style; + + DSRequestReceptiveCall( + {required this.backgroundColor, + required this.foregroundColor, + super.key, + this.borderRadius = const [DSBorderRadius.all], + this.bodyPadding = const EdgeInsets.symmetric( + vertical: 8.0, + horizontal: 16.0, + ), + required this.align, + DSMessageBubbleStyle? style}) + : style = style ?? DSMessageBubbleStyle(); + + @override + State createState() => _DSRequestReceptiveCallState(); +} + +class _DSRequestReceptiveCallState extends State { + @override + Widget build(BuildContext context) { + return Container(); + } +} From d13a3961f03b2a79a9ed43b7b1087b8e4bf26ef3 Mon Sep 17 00:00:00 2001 From: adrianoct42 Date: Tue, 2 Jul 2024 18:37:26 -0300 Subject: [PATCH 02/10] refactor: changed widget name --- ...pplication_json_message_bubble.widget.dart | 1 + ...tive_voice_call_message_bubble.widget.dart | 33 +++++++++++++++++ ..._request_receptive_call_bubble.widget.dart | 37 ------------------- 3 files changed, 34 insertions(+), 37 deletions(-) create mode 100644 lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart delete mode 100644 lib/src/widgets/chat/ds_request_receptive_call_bubble.widget.dart diff --git a/lib/src/widgets/chat/ds_application_json_message_bubble.widget.dart b/lib/src/widgets/chat/ds_application_json_message_bubble.widget.dart index 247f5325..70fe3684 100644 --- a/lib/src/widgets/chat/ds_application_json_message_bubble.widget.dart +++ b/lib/src/widgets/chat/ds_application_json_message_bubble.widget.dart @@ -77,6 +77,7 @@ class DSApplicationJsonMessageBubble extends StatelessWidget { style: style, avatarConfig: avatarConfig, ), + //'voice_call' => DSInteractiveVoiceCallMessageBubble(), _ => _buildUnsupportedContent(), }; } diff --git a/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart b/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart new file mode 100644 index 00000000..29c65234 --- /dev/null +++ b/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; + +import '../../enums/ds_align.enum.dart'; +import '../../enums/ds_border_radius.enum.dart'; +import '../../models/ds_message_bubble_style.model.dart'; +import '../../models/interactive_message/ds_interactive_message.model.dart'; + +class DSInteractiveVoiceCallMessageBubble extends StatefulWidget { + final DSInteractiveMessage content; + final DSAlign align; + final List borderRadius; + final DSMessageBubbleStyle style; + + DSInteractiveVoiceCallMessageBubble({ + super.key, + required this.content, + required this.align, + this.borderRadius = const [DSBorderRadius.all], + DSMessageBubbleStyle? style, + }) : style = style ?? DSMessageBubbleStyle(); + + @override + State createState() => + _DSInteractiveVoiceCallMessageBubbleState(); +} + +class _DSInteractiveVoiceCallMessageBubbleState + extends State { + @override + Widget build(BuildContext context) { + return Container(); + } +} diff --git a/lib/src/widgets/chat/ds_request_receptive_call_bubble.widget.dart b/lib/src/widgets/chat/ds_request_receptive_call_bubble.widget.dart deleted file mode 100644 index 2acbce35..00000000 --- a/lib/src/widgets/chat/ds_request_receptive_call_bubble.widget.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../../enums/ds_align.enum.dart'; -import '../../enums/ds_border_radius.enum.dart'; -import '../../models/ds_message_bubble_style.model.dart'; - -class DSRequestReceptiveCall extends StatefulWidget { - final Color backgroundColor; - final Color foregroundColor; - final List borderRadius; - final EdgeInsets bodyPadding; - final DSAlign align; - final DSMessageBubbleStyle style; - - DSRequestReceptiveCall( - {required this.backgroundColor, - required this.foregroundColor, - super.key, - this.borderRadius = const [DSBorderRadius.all], - this.bodyPadding = const EdgeInsets.symmetric( - vertical: 8.0, - horizontal: 16.0, - ), - required this.align, - DSMessageBubbleStyle? style}) - : style = style ?? DSMessageBubbleStyle(); - - @override - State createState() => _DSRequestReceptiveCallState(); -} - -class _DSRequestReceptiveCallState extends State { - @override - Widget build(BuildContext context) { - return Container(); - } -} From 280d1e75cf6b921802ee1d3d0a622e18ab5b58e3 Mon Sep 17 00:00:00 2001 From: adrianoct42 Date: Wed, 3 Jul 2024 18:55:44 -0300 Subject: [PATCH 03/10] feat: app now shows call request --- .../ds_interactive_message_action.model.dart | 15 ++++--- ...pplication_json_message_bubble.widget.dart | 8 +++- ...tive_voice_call_message_bubble.widget.dart | 45 ++++++++++++++++++- 3 files changed, 60 insertions(+), 8 deletions(-) diff --git a/lib/src/models/interactive_message/ds_interactive_message_action.model.dart b/lib/src/models/interactive_message/ds_interactive_message_action.model.dart index 63fb0447..3c0c30ba 100644 --- a/lib/src/models/interactive_message/ds_interactive_message_action.model.dart +++ b/lib/src/models/interactive_message/ds_interactive_message_action.model.dart @@ -5,12 +5,11 @@ class DSInteractiveMessageAction { final String? button; final List? buttons; final List? sections; + final String? name; + final Map? parameters; - DSInteractiveMessageAction({ - this.button, - this.buttons, - this.sections, - }); + DSInteractiveMessageAction( + {this.button, this.buttons, this.sections, this.name, this.parameters}); DSInteractiveMessageAction.fromJson(Map json) : button = json['button'], @@ -27,7 +26,9 @@ class DSInteractiveMessageAction { (e) => DSInteractiveMessageSection.fromJson(e), ) .toList() - : null; + : null, + name = json['name'], + parameters = json['parameters']; Map toJson() => { 'button': button, @@ -41,5 +42,7 @@ class DSInteractiveMessageAction { (e) => e.toJson(), ) .toList(), + 'name': name, + 'parameters': parameters, }; } diff --git a/lib/src/widgets/chat/ds_application_json_message_bubble.widget.dart b/lib/src/widgets/chat/ds_application_json_message_bubble.widget.dart index 70fe3684..8f6495ab 100644 --- a/lib/src/widgets/chat/ds_application_json_message_bubble.widget.dart +++ b/lib/src/widgets/chat/ds_application_json_message_bubble.widget.dart @@ -10,6 +10,7 @@ import '../../themes/colors/ds_colors.theme.dart'; import '../../themes/icons/ds_icons.dart'; import 'ds_interactive_button_message_bubble.widget.dart'; import 'ds_interactive_list_message_bubble.widget.dart'; +import 'ds_interactive_voice_call_message_bubble.widget.dart'; import 'ds_unsupported_content_message_bubble.widget.dart'; class DSApplicationJsonMessageBubble extends StatelessWidget { @@ -77,7 +78,12 @@ class DSApplicationJsonMessageBubble extends StatelessWidget { style: style, avatarConfig: avatarConfig, ), - //'voice_call' => DSInteractiveVoiceCallMessageBubble(), + 'voice_call' => DSInteractiveVoiceCallMessageBubble( + content: content, + align: align, + borderRadius: borderRadius, + style: style, + ), _ => _buildUnsupportedContent(), }; } diff --git a/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart b/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart index 29c65234..2e6253b8 100644 --- a/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart +++ b/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart @@ -4,6 +4,11 @@ import '../../enums/ds_align.enum.dart'; import '../../enums/ds_border_radius.enum.dart'; import '../../models/ds_message_bubble_style.model.dart'; import '../../models/interactive_message/ds_interactive_message.model.dart'; +import '../../themes/colors/ds_colors.theme.dart'; +import '../../themes/icons/ds_icons.dart'; +import '../texts/ds_headline_small_text.widget.dart'; +import '../utils/ds_divider.widget.dart'; +import 'ds_message_bubble.widget.dart'; class DSInteractiveVoiceCallMessageBubble extends StatefulWidget { final DSInteractiveMessage content; @@ -28,6 +33,44 @@ class _DSInteractiveVoiceCallMessageBubbleState extends State { @override Widget build(BuildContext context) { - return Container(); + return Column( + children: [ + DSMessageBubble( + align: widget.align, + style: widget.style, + borderRadius: widget.borderRadius, + child: Column( + children: [ + DSHeadlineSmallText( + widget.content.body?.text, + overflow: TextOverflow.visible, + color: DSColors.neutralLightSnow, + ), + const SizedBox( + height: 10, + ), + const DSDivider(), + const SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon(DSIcons.plus_outline), + const SizedBox( + width: 10, + ), + DSHeadlineSmallText( + widget.content.action?.parameters?['display_text'], + overflow: TextOverflow.visible, + color: DSColors.neutralLightSnow, + ) + ], + ) + ], + ), + ) + ], + ); } } From 18f91dcf928f8fb9ac4a63f10f566085a9a9df0f Mon Sep 17 00:00:00 2001 From: adrianoct42 Date: Thu, 4 Jul 2024 17:42:35 -0300 Subject: [PATCH 04/10] refactor: updating icon to voip_outline --- .../ds_interactive_voice_call_message_bubble.widget.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart b/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart index 2e6253b8..3b06e257 100644 --- a/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart +++ b/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart @@ -56,7 +56,10 @@ class _DSInteractiveVoiceCallMessageBubbleState Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Icon(DSIcons.plus_outline), + const Icon( + DSIcons.voip_outline, + color: DSColors.neutralLightSnow, + ), const SizedBox( width: 10, ), From 029816672924589220ead14864ca1ec4e2898a89 Mon Sep 17 00:00:00 2001 From: adrianoct42 Date: Tue, 9 Jul 2024 15:30:12 -0300 Subject: [PATCH 05/10] fix: voice call message now uses DSBodyText --- ..._interactive_voice_call_message_bubble.widget.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart b/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart index 3b06e257..b362919c 100644 --- a/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart +++ b/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart @@ -6,7 +6,7 @@ import '../../models/ds_message_bubble_style.model.dart'; import '../../models/interactive_message/ds_interactive_message.model.dart'; import '../../themes/colors/ds_colors.theme.dart'; import '../../themes/icons/ds_icons.dart'; -import '../texts/ds_headline_small_text.widget.dart'; +import '../texts/ds_body_text.widget.dart'; import '../utils/ds_divider.widget.dart'; import 'ds_message_bubble.widget.dart'; @@ -41,7 +41,7 @@ class _DSInteractiveVoiceCallMessageBubbleState borderRadius: widget.borderRadius, child: Column( children: [ - DSHeadlineSmallText( + DSBodyText( widget.content.body?.text, overflow: TextOverflow.visible, color: DSColors.neutralLightSnow, @@ -63,13 +63,16 @@ class _DSInteractiveVoiceCallMessageBubbleState const SizedBox( width: 10, ), - DSHeadlineSmallText( + DSBodyText( widget.content.action?.parameters?['display_text'], overflow: TextOverflow.visible, color: DSColors.neutralLightSnow, ) ], - ) + ), + const SizedBox( + height: 5, + ), ], ), ) From 30d849bcba1aae08074be98a244480374944a07c Mon Sep 17 00:00:00 2001 From: adrianoct42 Date: Wed, 10 Jul 2024 18:00:37 -0300 Subject: [PATCH 06/10] refactor: added trailing comma to better code legibility --- .../ds_interactive_message_action.model.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/src/models/interactive_message/ds_interactive_message_action.model.dart b/lib/src/models/interactive_message/ds_interactive_message_action.model.dart index 3c0c30ba..0dcf5a0f 100644 --- a/lib/src/models/interactive_message/ds_interactive_message_action.model.dart +++ b/lib/src/models/interactive_message/ds_interactive_message_action.model.dart @@ -8,8 +8,13 @@ class DSInteractiveMessageAction { final String? name; final Map? parameters; - DSInteractiveMessageAction( - {this.button, this.buttons, this.sections, this.name, this.parameters}); + DSInteractiveMessageAction({ + this.button, + this.buttons, + this.sections, + this.name, + this.parameters, + }); DSInteractiveMessageAction.fromJson(Map json) : button = json['button'], From 26b2021d67507bd9a443ad4b4da4ee3b3e788ab8 Mon Sep 17 00:00:00 2001 From: adrianoct42 Date: Fri, 12 Jul 2024 18:56:06 -0300 Subject: [PATCH 07/10] fix: parameters now has its own class --- lib/blip_ds.dart | 4 + .../ds_interactive_message_action.model.dart | 7 +- ..._interactive_message_parameters.model.dart | 14 +++ ...tive_voice_call_message_bubble.widget.dart | 108 +++++++++--------- 4 files changed, 80 insertions(+), 53 deletions(-) create mode 100644 lib/src/models/interactive_message/ds_interactive_message_parameters.model.dart diff --git a/lib/blip_ds.dart b/lib/blip_ds.dart index fcf63b92..6e3c6406 100644 --- a/lib/blip_ds.dart +++ b/lib/blip_ds.dart @@ -46,6 +46,8 @@ export 'src/models/interactive_message/ds_interactive_message_image.model.dart' show DSInteractiveMessageImage; export 'src/models/interactive_message/ds_interactive_message_media.model.dart' show DSInteractiveMessageMedia; +export 'src/models/interactive_message/ds_interactive_message_parameters.model.dart' + show DSInteractiveMessageParameters; export 'src/models/interactive_message/ds_interactive_message_row.model.dart' show DSInteractiveMessageRow; export 'src/models/interactive_message/ds_interactive_message_section.model.dart' @@ -138,6 +140,8 @@ export 'src/widgets/chat/ds_interactive_button_message_bubble.widget.dart' show DSInteractiveButtonMessageBubble; export 'src/widgets/chat/ds_interactive_list_message_bubble.widget.dart' show DSInteractiveListMessageBubble; +export 'src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart' + show DSInteractiveVoiceCallMessageBubble; export 'src/widgets/chat/ds_location_message_bubble.widget.dart' show DSLocationMessageBubble; export 'src/widgets/chat/ds_message_bubble.widget.dart' show DSMessageBubble; diff --git a/lib/src/models/interactive_message/ds_interactive_message_action.model.dart b/lib/src/models/interactive_message/ds_interactive_message_action.model.dart index 0dcf5a0f..7b27f08a 100644 --- a/lib/src/models/interactive_message/ds_interactive_message_action.model.dart +++ b/lib/src/models/interactive_message/ds_interactive_message_action.model.dart @@ -1,4 +1,5 @@ import 'ds_interactive_message_button.model.dart'; +import 'ds_interactive_message_parameters.model.dart'; import 'ds_interactive_message_section.model.dart'; class DSInteractiveMessageAction { @@ -6,7 +7,7 @@ class DSInteractiveMessageAction { final List? buttons; final List? sections; final String? name; - final Map? parameters; + final DSInteractiveMessageParameters? parameters; DSInteractiveMessageAction({ this.button, @@ -33,7 +34,9 @@ class DSInteractiveMessageAction { .toList() : null, name = json['name'], - parameters = json['parameters']; + parameters = DSInteractiveMessageParameters.fromJson( + json['parameters'], + ); Map toJson() => { 'button': button, diff --git a/lib/src/models/interactive_message/ds_interactive_message_parameters.model.dart b/lib/src/models/interactive_message/ds_interactive_message_parameters.model.dart new file mode 100644 index 00000000..17a7f5bc --- /dev/null +++ b/lib/src/models/interactive_message/ds_interactive_message_parameters.model.dart @@ -0,0 +1,14 @@ +class DSInteractiveMessageParameters { + final String? displayText; + + DSInteractiveMessageParameters({ + this.displayText, + }); + + DSInteractiveMessageParameters.fromJson(Map json) + : displayText = json['display_text']; + + Map toJson() => { + 'display_text': displayText, + }; +} diff --git a/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart b/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart index b362919c..37524da0 100644 --- a/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart +++ b/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart @@ -10,73 +10,79 @@ import '../texts/ds_body_text.widget.dart'; import '../utils/ds_divider.widget.dart'; import 'ds_message_bubble.widget.dart'; -class DSInteractiveVoiceCallMessageBubble extends StatefulWidget { +class DSInteractiveVoiceCallMessageBubble extends StatelessWidget { final DSInteractiveMessage content; final DSAlign align; final List borderRadius; final DSMessageBubbleStyle style; + late final bool _isLightBubbleBackground; + DSInteractiveVoiceCallMessageBubble({ super.key, required this.content, required this.align, this.borderRadius = const [DSBorderRadius.all], DSMessageBubbleStyle? style, - }) : style = style ?? DSMessageBubbleStyle(); + }) : style = style ?? DSMessageBubbleStyle() { + _initProperties(); + } - @override - State createState() => - _DSInteractiveVoiceCallMessageBubbleState(); -} + void _initProperties() { + _isLightBubbleBackground = style.isLightBubbleBackground(align); + } -class _DSInteractiveVoiceCallMessageBubbleState - extends State { @override Widget build(BuildContext context) { - return Column( - children: [ - DSMessageBubble( - align: widget.align, - style: widget.style, - borderRadius: widget.borderRadius, - child: Column( - children: [ - DSBodyText( - widget.content.body?.text, - overflow: TextOverflow.visible, - color: DSColors.neutralLightSnow, - ), - const SizedBox( - height: 10, - ), - const DSDivider(), - const SizedBox( - height: 10, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Icon( - DSIcons.voip_outline, - color: DSColors.neutralLightSnow, - ), - const SizedBox( - width: 10, - ), - DSBodyText( - widget.content.action?.parameters?['display_text'], - overflow: TextOverflow.visible, - color: DSColors.neutralLightSnow, - ) - ], - ), - const SizedBox( - height: 5, - ), - ], + return DSMessageBubble( + align: align, + style: style, + borderRadius: borderRadius, + child: Column( + children: [ + DSBodyText( + content.body?.text, + overflow: TextOverflow.visible, + color: _isLightBubbleBackground + ? DSColors.neutralDarkCity + : DSColors.neutralLightSnow, + ), + const Padding( + padding: EdgeInsets.symmetric( + vertical: 10.0, + ), + child: DSDivider(), + ), + content.action?.name == 'voice_call' + ? Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + DSIcons.voip_outline, + color: _isLightBubbleBackground + ? DSColors.neutralDarkCity + : DSColors.neutralLightSnow, + ), + const SizedBox( + width: 10, + ), + content.action?.parameters?.displayText != null + ? DSBodyText( + content.action?.parameters?.displayText, + overflow: TextOverflow.visible, + color: _isLightBubbleBackground + ? DSColors.neutralDarkCity + : DSColors.neutralLightSnow, + ) + : const SizedBox.shrink() + ], + ) + : const SizedBox.shrink(), + const SizedBox( + height: 5, ), - ) - ], + ], + ), ); } } From 7be88cb476adfb6d8ec2c0599528bb749078e030 Mon Sep 17 00:00:00 2001 From: Marcelo Amaro Date: Wed, 17 Jul 2024 07:31:14 -0300 Subject: [PATCH 08/10] feat: fix layout paddings and improve code readability --- .../ds_interactive_message_action.model.dart | 10 +-- ...tive_voice_call_message_bubble.widget.dart | 67 ++++++++++--------- 2 files changed, 43 insertions(+), 34 deletions(-) diff --git a/lib/src/models/interactive_message/ds_interactive_message_action.model.dart b/lib/src/models/interactive_message/ds_interactive_message_action.model.dart index 7b27f08a..3dda3cb0 100644 --- a/lib/src/models/interactive_message/ds_interactive_message_action.model.dart +++ b/lib/src/models/interactive_message/ds_interactive_message_action.model.dart @@ -34,9 +34,11 @@ class DSInteractiveMessageAction { .toList() : null, name = json['name'], - parameters = DSInteractiveMessageParameters.fromJson( - json['parameters'], - ); + parameters = json['parameters'] != null + ? DSInteractiveMessageParameters.fromJson( + json['parameters'], + ) + : null; Map toJson() => { 'button': button, @@ -51,6 +53,6 @@ class DSInteractiveMessageAction { ) .toList(), 'name': name, - 'parameters': parameters, + 'parameters': parameters?.toJson(), }; } diff --git a/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart b/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart index 37524da0..2d24d80e 100644 --- a/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart +++ b/lib/src/widgets/chat/ds_interactive_voice_call_message_bubble.widget.dart @@ -17,6 +17,7 @@ class DSInteractiveVoiceCallMessageBubble extends StatelessWidget { final DSMessageBubbleStyle style; late final bool _isLightBubbleBackground; + late final Color _foregroundColor; DSInteractiveVoiceCallMessageBubble({ super.key, @@ -30,6 +31,10 @@ class DSInteractiveVoiceCallMessageBubble extends StatelessWidget { void _initProperties() { _isLightBubbleBackground = style.isLightBubbleBackground(align); + + _foregroundColor = _isLightBubbleBackground + ? DSColors.neutralDarkCity + : DSColors.neutralLightSnow; } @override @@ -43,44 +48,46 @@ class DSInteractiveVoiceCallMessageBubble extends StatelessWidget { DSBodyText( content.body?.text, overflow: TextOverflow.visible, - color: _isLightBubbleBackground - ? DSColors.neutralDarkCity - : DSColors.neutralLightSnow, - ), - const Padding( - padding: EdgeInsets.symmetric( - vertical: 10.0, - ), - child: DSDivider(), + color: _foregroundColor, ), content.action?.name == 'voice_call' - ? Row( - mainAxisAlignment: MainAxisAlignment.center, + ? Column( children: [ - Icon( - DSIcons.voip_outline, - color: _isLightBubbleBackground - ? DSColors.neutralDarkCity - : DSColors.neutralLightSnow, + const Padding( + padding: EdgeInsets.symmetric( + vertical: 8.0, + ), + child: DSDivider(), ), - const SizedBox( - width: 10, + Padding( + padding: const EdgeInsets.symmetric( + vertical: 8.0, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + DSIcons.voip_outline, + color: _foregroundColor, + ), + content.action?.parameters?.displayText != null + ? Padding( + padding: const EdgeInsets.only( + left: 8.0, + ), + child: DSBodyText( + content.action?.parameters?.displayText, + overflow: TextOverflow.visible, + color: _foregroundColor, + ), + ) + : const SizedBox.shrink() + ], + ), ), - content.action?.parameters?.displayText != null - ? DSBodyText( - content.action?.parameters?.displayText, - overflow: TextOverflow.visible, - color: _isLightBubbleBackground - ? DSColors.neutralDarkCity - : DSColors.neutralLightSnow, - ) - : const SizedBox.shrink() ], ) : const SizedBox.shrink(), - const SizedBox( - height: 5, - ), ], ), ); From 9ea519389e77f967ef1a13561996ff6cbe858b5a Mon Sep 17 00:00:00 2001 From: Marcelo Amaro Date: Mon, 22 Jul 2024 08:24:25 -0300 Subject: [PATCH 09/10] chore: upgrade blip_ds version from 0.1.3 to 0.1.4 --- pubspec.yaml | 2 +- sample/pubspec.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 3e60c6b7..65581f71 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: blip_ds description: Blip Design System for Flutter. -version: 0.1.3 +version: 0.1.4 homepage: https://github.com/takenet/blip-ds-flutter#readme repository: https://github.com/takenet/blip-ds-flutter diff --git a/sample/pubspec.lock b/sample/pubspec.lock index a3309f1e..b6377af1 100644 --- a/sample/pubspec.lock +++ b/sample/pubspec.lock @@ -31,7 +31,7 @@ packages: path: ".." relative: true source: path - version: "0.1.2" + version: "0.1.4" boolean_selector: dependency: transitive description: From c1c86ae850d24bb9b35819b902294d598f7c859e Mon Sep 17 00:00:00 2001 From: Marcelo Amaro Date: Mon, 22 Jul 2024 08:25:54 -0300 Subject: [PATCH 10/10] chore: add changelog to version 0.1.4 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 302b4779..fb220f42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.4 + +- [DSInteractiveVoiceCallMessageBubble] Added new bubble to render the request call message. + ## 0.1.3 - [DSIcons] Added new icons.