Skip to content

Commit

Permalink
Merge pull request #96 from takenet/release/v0.0.31
Browse files Browse the repository at this point in the history
Release/v0.0.31
  • Loading branch information
leonardogbr authored Mar 3, 2023
2 parents 4f8e67d + 72f8523 commit 8244ff1
Show file tree
Hide file tree
Showing 12 changed files with 627 additions and 500 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.32

* [DSToast] Fixed toast overlap

## 0.0.31

* [DSText] Add selectable text feature
Expand Down
File renamed without changes
235 changes: 107 additions & 128 deletions lib/blip_ds.dart
Original file line number Diff line number Diff line change
@@ -1,31 +1,60 @@
library blip_ds;

/// Extensions
export 'package:blip_ds/src/extensions/ds_border_radius.extension.dart'
show DSBorderRadiusExtension, DSBorderRadiusListExtension;
export 'package:blip_ds/src/extensions/ds_delivery_report_status.extension.dart'
show DSDeliveryReportStatusExtension;

export 'src/enums/ds_align.enum.dart' show DSAlign;
/// Enums
export 'src/enums/ds_border_radius.enum.dart' show DSBorderRadius;
export 'src/enums/ds_delivery_report_status.enum.dart'
show DSDeliveryReportStatus;
export 'src/enums/ds_ticket_message_type.enum.dart' show DSTicketMessageType;
export 'src/enums/ds_toast_action_type.enum.dart' show DSToastActionType;
export 'src/models/ds_message_bubble_avatar_config.model.dart'
show DSMessageBubbleAvatarConfig;
export 'src/models/ds_message_bubble_style.model.dart'
show DSMessageBubbleStyle;
/// Models
export 'src/models/ds_message_item.model.dart' show DSMessageItemModel;
export 'src/models/ds_toast_props.model.dart' show DSToastProps;
export 'src/services/ds_bottom_sheet.service.dart' show DSBottomSheetService;
/// Services
export 'src/services/ds_dialog.service.dart' show DSDialogService;
export 'src/services/ds_toast.service.dart' show DSToastService;
/// Themes / Colors
export 'src/themes/colors/ds_colors.theme.dart' show DSColors;
export 'src/themes/colors/ds_linear_gradient.theme.dart' show DSLinearGradient;
/// Icons
export 'src/themes/icons/ds_icons.dart' show DSIcons;
export 'src/themes/texts/ds_cupertino_theme_data.theme.dart'
show DSCupertinoThemeData;
export 'src/themes/texts/ds_text_selection_theme.theme.dart'
show DSTextSelectionThemeData;
/// Themes / Texts
export 'src/themes/texts/ds_text_theme.theme.dart' show DSTextTheme;
export 'src/themes/texts/styles/ds_body_text_style.theme.dart'
show DSBodyTextStyle;
export 'src/themes/texts/styles/ds_button_text_style.theme.dart'
show DSButtonTextStyle;
export 'src/themes/texts/styles/ds_caption_small_text_style.theme.dart'
show DSCaptionSmallTextStyle;
export 'src/themes/texts/styles/ds_caption_text_style.theme.dart'
show DSCaptionTextStyle;
/// Themes / Texts / Styles
export 'src/themes/texts/styles/ds_headline_large_text_style.theme.dart'
show DSHeadlineLargeTextStyle;
export 'src/themes/texts/styles/ds_headline_small_text_style.theme.dart'
show DSHeadlineSmallTextStyle;
/// Themes / Texts / Utils
export 'src/themes/texts/utils/ds_font_families.theme.dart' show DSFontFamilies;
export 'src/themes/texts/utils/ds_font_weights.theme.dart' show DSFontWeights;
export 'src/utils/ds_animate.util.dart' show DSAnimate;
export 'src/utils/ds_linkify.util.dart' show DSLinkify;
/// Utils
export 'src/utils/ds_utils.util.dart' show DSUtils;
export 'src/utils/ds_linkify.util.dart' show DSLinkify;
export 'src/utils/ds_animate.util.dart' show DSAnimate;

/// Widgets / Chat
export 'src/widgets/chat/ds_message_bubble.widget.dart' show DSMessageBubble;
export 'src/widgets/chat/ds_text_message_bubble.widget.dart'
show DSTextMessageBubble;
export 'src/widgets/chat/ds_file_message_bubble.widget.dart'
show DSFileMessageBubble;
export 'src/widgets/chat/ds_image_message_bubble.widget.dart'
show DSImageMessageBubble;
export 'src/widgets/chat/ds_unsupported_content_message_bubble.widget.dart'
show DSUnsupportedContentMessageBubble;
export 'src/widgets/chat/ds_url_preview.widget.dart' show DSUrlPreview;
export 'src/widgets/chat/ds_delivery_report_icon.widget.dart'
show DSDeliveryReportIcon;

/// Widgets / Chat / Audio
export 'src/widgets/chat/audio/ds_audio_message_bubble.widget.dart'
show DSAudioMessageBubble;

/// Widgets / Chat / Form Fields
export 'src/widgets/fields/ds_text_form_field.widget.dart' show DSTextFormField;

/// Widgets / Animations
export 'src/widgets/animations/ds_animated_size.widget.dart'
show DSAnimatedSize;
Expand All @@ -34,126 +63,76 @@ export 'src/widgets/animations/ds_fading_circle_loading.widget.dart'
export 'src/widgets/animations/ds_ring_loading.widget.dart' show DSRingLoading;
export 'src/widgets/animations/ds_spinner_loading.widget.dart'
show DSSpinnerLoading;

export 'src/widgets/buttons/ds_attachment_button.widget.dart'
show DSAttachmentButton;
/// Widgets / Buttons
export 'src/widgets/buttons/ds_button.widget.dart' show DSButton;
export 'src/widgets/buttons/ds_icon_button.widget.dart' show DSIconButton;
export 'src/widgets/buttons/ds_primary_button.widget.dart' show DSPrimaryButton;
export 'src/widgets/buttons/ds_secondary_button.widget.dart'
show DSSecondaryButton;
export 'src/widgets/buttons/ds_send_button.widget.dart' show DSSendButton;
export 'src/widgets/buttons/ds_tertiary_button.widget.dart'
show DSTertiaryButton;
export 'src/widgets/buttons/ds_send_button.widget.dart' show DSSendButton;
export 'src/widgets/buttons/ds_icon_button.widget.dart' show DSIconButton;
export 'src/widgets/buttons/ds_attachment_button.widget.dart'
show DSAttachmentButton;

/// Widgets / Texts
export 'src/widgets/texts/ds_text.widget.dart' show DSText;
/// Widgets / Chat / Audio
export 'src/widgets/chat/audio/ds_audio_message_bubble.widget.dart'
show DSAudioMessageBubble;
/// Widgets / Carrousel
export 'src/widgets/chat/ds_carrousel.widget.dart' show DSCarrousel;
export 'src/widgets/chat/ds_delivery_report_icon.widget.dart'
show DSDeliveryReportIcon;
export 'src/widgets/chat/ds_file_message_bubble.widget.dart'
show DSFileMessageBubble;
export 'src/widgets/chat/ds_image_message_bubble.widget.dart'
show DSImageMessageBubble;
/// Widgets / Chat
export 'src/widgets/chat/ds_message_bubble.widget.dart' show DSMessageBubble;
export 'src/widgets/chat/ds_text_message_bubble.widget.dart'
show DSTextMessageBubble;
export 'src/widgets/chat/ds_unsupported_content_message_bubble.widget.dart'
show DSUnsupportedContentMessageBubble;
export 'src/widgets/chat/ds_url_preview.widget.dart' show DSUrlPreview;
/// Widgets / Weblink
export 'src/widgets/chat/ds_weblink.widget.dart' show DSWeblink;
export 'src/widgets/chat/typing/ds_typing_dot_animation.widget.dart'
show DSTypingDotAnimation;
/// Widgets / Typing
export 'src/widgets/chat/typing/ds_typing_message_bubble.widget.dart'
show DSTypingAnimationMessageBubble;
/// Widgets / Video
export 'src/widgets/chat/video/ds_video_message_bubble.widget.dart'
show DSVideoMessageBubble;
export 'src/widgets/chat/video/ds_video_player.widget.dart' show DSVideoPlayer;
/// Widgets / Chat / Form Fields
export 'src/widgets/fields/ds_text_form_field.widget.dart' show DSTextFormField;
/// Widgets / Radio
export 'src/widgets/radio/ds_radio.widget.dart' show DSRadio;
export 'src/widgets/radio/ds_radio_tile.widget.dart' show DSRadioTile;
export 'src/widgets/switch/ds_switch.widget.dart' show DSSwitch;
/// Widgets / SwitchTile
export 'src/widgets/switch/ds_switch_tile.widget.dart' show DSSwitchTile;
export 'src/widgets/tags/ds_input_chip.widget.dart' show DSInputChip;
export 'src/widgets/texts/ds_body_text.widget.dart' show DSBodyText;
export 'src/widgets/texts/ds_button_text.widget.dart' show DSButtonText;
export 'src/widgets/texts/ds_caption_small_text.widget.dart'
show DSCaptionSmallText;
export 'src/widgets/texts/ds_caption_text.widget.dart' show DSCaptionText;
export 'src/widgets/texts/ds_headline_large_text.widget.dart'
show DSHeadlineLargeText;
export 'src/widgets/texts/ds_headline_small_text.widget.dart'
show DSHeadlineSmallText;
export 'src/widgets/texts/ds_caption_text.widget.dart' show DSCaptionText;
export 'src/widgets/texts/ds_caption_small_text.widget.dart'
show DSCaptionSmallText;
export 'src/widgets/texts/ds_button_text.widget.dart' show DSButtonText;

/// Widgets / Texts
export 'src/widgets/texts/ds_text.widget.dart' show DSText;
/// Widgets / Information message
export 'src/widgets/ticket_message/ds_ticket_message.widget.dart'
show DSTicketMessage;
/// Widgets / Utils
export 'src/widgets/utils/ds_cached_network_image_view.widget.dart'
show DSCachedNetworkImageView;
export 'src/widgets/utils/ds_user_avatar.widget.dart' show DSUserAvatar;
export 'src/widgets/utils/ds_group_card.widget.dart' show DSGroupCard;
export 'src/widgets/utils/ds_header.widget.dart' show DSHeader;
export 'src/widgets/utils/ds_chip.widget.dart' show DSChip;
export 'src/widgets/utils/ds_divider.widget.dart' show DSDivider;
export 'src/widgets/tags/ds_input_chip.widget.dart' show DSInputChip;
export 'src/widgets/utils/ds_file_extension_icon.util.dart'
show DSFileExtensionIcon;

/// Enums
export 'src/enums/ds_border_radius.enum.dart' show DSBorderRadius;
export 'src/enums/ds_align.enum.dart' show DSAlign;
export 'src/enums/ds_delivery_report_status.enum.dart'
show DSDeliveryReportStatus;
export 'src/enums/ds_toast_action_type.enum.dart' show DSToastActionType;
export 'src/enums/ds_ticket_message_type.enum.dart' show DSTicketMessageType;

/// Extensions
export 'package:blip_ds/src/extensions/ds_border_radius.extension.dart'
show DSBorderRadiusExtension, DSBorderRadiusListExtension;
export 'package:blip_ds/src/extensions/ds_delivery_report_status.extension.dart'
show DSDeliveryReportStatusExtension;

/// Themes / Colors
export 'src/themes/colors/ds_colors.theme.dart' show DSColors;
export 'src/themes/colors/ds_linear_gradient.theme.dart' show DSLinearGradient;

/// Themes / Texts
export 'src/themes/texts/ds_text_theme.theme.dart' show DSTextTheme;
export 'src/themes/texts/ds_text_selection_theme.theme.dart'
show DSTextSelectionThemeData;
export 'src/themes/texts/ds_cupertino_theme_data.theme.dart'
show DSCupertinoThemeData;

/// Themes / Texts / Utils
export 'src/themes/texts/utils/ds_font_families.theme.dart' show DSFontFamilies;
export 'src/themes/texts/utils/ds_font_weights.theme.dart' show DSFontWeights;

/// Themes / Texts / Styles
export 'src/themes/texts/styles/ds_headline_large_text_style.theme.dart'
show DSHeadlineLargeTextStyle;
export 'src/themes/texts/styles/ds_headline_small_text_style.theme.dart'
show DSHeadlineSmallTextStyle;
export 'src/themes/texts/styles/ds_caption_small_text_style.theme.dart'
show DSCaptionSmallTextStyle;
export 'src/themes/texts/styles/ds_body_text_style.theme.dart'
show DSBodyTextStyle;
export 'src/themes/texts/styles/ds_button_text_style.theme.dart'
show DSButtonTextStyle;
export 'src/themes/texts/styles/ds_caption_text_style.theme.dart'
show DSCaptionTextStyle;

/// Services
export 'src/services/ds_dialog.service.dart' show DSDialogService;
export 'src/services/ds_toast.service.dart' show DSToastService;
export 'src/services/ds_bottom_sheet.service.dart' show DSBottomSheetService;

/// Models
export 'src/models/ds_message_item.model.dart' show DSMessageItemModel;
export 'src/models/ds_message_bubble_style.model.dart'
show DSMessageBubbleStyle;
export 'src/models/ds_message_bubble_avatar_config.model.dart'
show DSMessageBubbleAvatarConfig;

/// Widgets / Typing
export 'src/widgets/chat/typing/ds_typing_message_bubble.widget.dart'
show DSTypingAnimationMessageBubble;
export 'src/widgets/chat/typing/ds_typing_dot_animation.widget.dart'
show DSTypingDotAnimation;

/// Widgets / SwitchTile
export 'src/widgets/switch/ds_switch_tile.widget.dart' show DSSwitchTile;
export 'src/widgets/switch/ds_switch.widget.dart' show DSSwitch;

/// Widgets / Radio
export 'src/widgets/radio/ds_radio.widget.dart' show DSRadio;
export 'src/widgets/radio/ds_radio_tile.widget.dart' show DSRadioTile;

/// Widgets / Video
export 'src/widgets/chat/video/ds_video_message_bubble.widget.dart'
show DSVideoMessageBubble;
export 'src/widgets/chat/video/ds_video_player.widget.dart' show DSVideoPlayer;

/// Widgets / Carrousel
export 'src/widgets/chat/ds_carrousel.widget.dart' show DSCarrousel;

/// Widgets / Information message
export 'src/widgets/ticket_message/ds_ticket_message.widget.dart'
show DSTicketMessage;

/// Icons
export 'src/themes/icons/ds_icons.dart' show DSIcons;

/// Widgets / Weblink
export 'src/widgets/chat/ds_weblink.widget.dart' show DSWeblink;
export 'src/widgets/utils/ds_group_card.widget.dart' show DSGroupCard;
export 'src/widgets/utils/ds_header.widget.dart' show DSHeader;
export 'src/widgets/utils/ds_user_avatar.widget.dart' show DSUserAvatar;
59 changes: 59 additions & 0 deletions lib/src/models/ds_toast_props.model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import 'package:flutter/foundation.dart';

import '../enums/ds_toast_action_type.enum.dart';
import '../enums/ds_toast_type.enum.dart';

class DSToastProps {
/// Creates a new Design System's [DSToastProps]
DSToastProps({
this.title,
this.message,
this.actionType = DSToastActionType.icon,
this.buttonText,
this.onPressedButton,
this.toastDuration,
this.positionOffset = 60.0,
}) : assert(
(actionType == DSToastActionType.button &&
buttonText != null &&
onPressedButton != null) ||
actionType != DSToastActionType.button,
),
assert(
(title?.isNotEmpty ?? false) || (message?.isNotEmpty ?? false),
);

/// Use [title] to show title in toast.
///
/// The [title] parameter is optional. If not defined, it will not be shown.
final String? title;

/// Use [message] to show the message below the title in the toast
final String? message;

/// Use [actionType] to set the action type of the toast output resource
/// [DSActionType.icon] or [DSActionType.button].
final DSToastActionType actionType;

/// If you want to replace the close icon with a custom one, use the [buttonText]
/// parameter to define the name
final String? buttonText;

/// When using a custom button, it is possible to define a callback
/// function to perform some action. Use the [onPressedButton] parameter.
final Function? onPressedButton;

/// Use [positionOffset] to position the toast, moving up relative to the bottom of the screen.
final double positionOffset;

/// Set a time value in milliseconds using the [toastDuration] parameter to
/// keep the toast on the screen without closing. If you set the value to 0, the toast
/// will not close automatically, depending on a manual action.
final int? toastDuration;

/// [DSToast] type that will be automatically set
DSToastType type = DSToastType.system;

/// [DSToast] unique key that will be automatically set
UniqueKey? key;
}
Loading

0 comments on commit 8244ff1

Please sign in to comment.