Skip to content

Commit

Permalink
Merge pull request #261 from takenet/release/0.1.1
Browse files Browse the repository at this point in the history
[Release] 0.1.1
  • Loading branch information
mpamaro authored May 22, 2024
2 parents b7b4e53 + d36fa95 commit fbf3383
Show file tree
Hide file tree
Showing 39 changed files with 143 additions and 131 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.1.1

- [DSVideoMessageBubble] Added title to this bubble.
- [DSUrlPreview] Added visual feedback when tapped.

## 0.1.0

- [DSExpandedImage] Fixed image layout when expanded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class DSInteractiveMessageDocument extends DSInteractiveMessageMedia {
this.filename,
});

DSInteractiveMessageDocument.fromJson(Map<String, dynamic> json)
DSInteractiveMessageDocument.fromJson(super.json)
: filename = json['filename'],
super.fromJson(json);
super.fromJson();

@override
Map<String, dynamic> toJson() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'ds_interactive_message_media.model.dart';

class DSInteractiveMessageImage extends DSInteractiveMessageMedia {
DSInteractiveMessageImage.fromJson(Map<String, dynamic> json)
: super.fromJson(json);
DSInteractiveMessageImage.fromJson(super.json)
: super.fromJson();
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'ds_interactive_message_media.model.dart';

class DSInteractiveMessageVideo extends DSInteractiveMessageMedia {
DSInteractiveMessageVideo.fromJson(Map<String, dynamic> json)
: super.fromJson(json);
DSInteractiveMessageVideo.fromJson(super.json)
: super.fromJson();
}
38 changes: 19 additions & 19 deletions lib/src/themes/icons/ds_icons.dart
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/// Flutter icons DSIcons
/// Copyright (C) 2022 by original authors @ fluttericon.com, fontello.com
/// This font was generated by FlutterIcon.com, which is derived from Fontello.
///
/// To use this font, place it in your fonts/ directory and include the
/// following in your pubspec.yaml
///
/// flutter:
/// fonts:
/// - family: DSIcons
/// fonts:
/// - asset: fonts/DSIcons.ttf
///
///
/// * Material Design Icons, Copyright (C) Google, Inc
/// Author: Google
/// License: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
/// Homepage: https://design.google.com/icons/
///
// Flutter icons DSIcons
// Copyright (C) 2022 by original authors @ fluttericon.com, fontello.com
// This font was generated by FlutterIcon.com, which is derived from Fontello.
//
// To use this font, place it in your fonts/ directory and include the
// following in your pubspec.yaml
//
// flutter:
// fonts:
// - family: DSIcons
// fonts:
// - asset: fonts/DSIcons.ttf
//
//
// * Material Design Icons, Copyright (C) Google, Inc
// Author: Google
// License: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
// Homepage: https://design.google.com/icons/

import 'package:flutter/widgets.dart';

import 'ds_icon_data.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class DSFadingCircleLoading extends StatelessWidget {

/// A Design System's animated spinner fading circle primarily used by loading scenarios.
const DSFadingCircleLoading({
Key? key,
super.key,
required this.color,
this.size = 30.0,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/animations/ds_ring_loading.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class DSRingLoading extends StatelessWidget {

/// Creates a Design System's animated spinner ring.
const DSRingLoading({
Key? key,
super.key,
required this.color,
this.size = 24.0,
this.lineWidth = 2.0,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/animations/ds_spinner_loading.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import '../../themes/colors/ds_colors.theme.dart';

class DSSpinnerLoading extends StatefulWidget {
const DSSpinnerLoading({
Key? key,
super.key,
this.color = DSColors.primary,
this.lineWidth = 5.0,
this.size = 30.0,
this.duration = const Duration(milliseconds: 500),
this.controller,
}) : super(key: key);
});

final Color color;
final double size;
Expand Down
5 changes: 2 additions & 3 deletions lib/src/widgets/buttons/ds_menu_item.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import '../../../blip_ds.dart';

class DSMenuItem extends StatelessWidget {
DSMenuItem({
Key? key,
super.key,
required this.text,
required this.align,
this.showDivider = false,
this.onPressed,
this.fontWeight = DSFontWeights.bold,
DSMessageBubbleStyle? style,
}) : style = style ?? DSMessageBubbleStyle(),
super(key: key) {
}) : style = style ?? DSMessageBubbleStyle() {
isDefaultBubbleColors = this.style.isDefaultBubbleBackground(align);
isLightBubbleBackground = this.style.isLightBubbleBackground(align);
}
Expand Down
5 changes: 2 additions & 3 deletions lib/src/widgets/chat/ds_carrousel.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,15 @@ class DSCarrousel extends StatelessWidget {
final DSMessageBubbleStyle style;

DSCarrousel({
Key? key,
super.key,
required this.align,
required this.content,
required this.borderRadius,
this.onSelected,
this.onOpenLink,
this.avatarConfig = const DSMessageBubbleAvatarConfig(),
DSMessageBubbleStyle? style,
}) : style = style ?? DSMessageBubbleStyle(),
super(key: key);
}) : style = style ?? DSMessageBubbleStyle();

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/chat/ds_delivery_report_icon.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class DSDeliveryReportIcon extends StatelessWidget {

/// Creates a new Design System's [DSDeliveryReportIcon]
const DSDeliveryReportIcon({
Key? key,
super.key,
required this.deliveryStatus,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
5 changes: 2 additions & 3 deletions lib/src/widgets/chat/ds_document_select.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ class DSDocumentSelect extends StatelessWidget {

/// Creates a new Design System's [DSDocumentSelect]
DSDocumentSelect({
Key? key,
super.key,
required this.align,
required this.options,
this.onSelected,
this.onOpenLink,
DSMessageBubbleStyle? style,
}) : style = style ?? DSMessageBubbleStyle(),
super(key: key);
}) : style = style ?? DSMessageBubbleStyle();

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/chat/ds_message_bubble.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DSMessageBubble extends StatelessWidget {
final bool hasSpacer;

const DSMessageBubble({
Key? key,
super.key,
required this.align,
required this.child,
this.replyContent,
Expand All @@ -36,7 +36,7 @@ class DSMessageBubble extends StatelessWidget {
this.defaultMinSize = DSUtils.bubbleMinSize,
required this.style,
this.hasSpacer = true,
}) : super(key: key);
});

@override
Widget build(BuildContext context) => Column(
Expand Down
5 changes: 2 additions & 3 deletions lib/src/widgets/chat/ds_message_bubble_detail.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ class DSMessageBubbleDetail extends StatelessWidget {

/// Creates a new Design System's [DSMessageBubbleDetail]
const DSMessageBubbleDetail({
Key? key,
super.key,
required this.align,
required this.deliveryStatus,
required this.style,
this.showMessageStatus = true,
this.date,
this.detailWidget,
}) : assert((date != null || detailWidget != null)),
super(key: key);
}) : assert((date != null || detailWidget != null));

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/chat/ds_quick_reply.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class DSQuickReply extends StatelessWidget {
final void Function(String, Map<String, dynamic>)? onSelected;

const DSQuickReply({
Key? key,
super.key,
required this.align,
required this.content,
this.onSelected,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
5 changes: 2 additions & 3 deletions lib/src/widgets/chat/ds_text_message_bubble.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DSTextMessageBubble extends StatefulWidget {
final DSMessageBubbleStyle style;

DSTextMessageBubble({
Key? key,
super.key,
required this.text,
required this.align,
this.replyContent,
Expand All @@ -33,8 +33,7 @@ class DSTextMessageBubble extends StatefulWidget {
this.showSelect = false,
this.onSelected,
DSMessageBubbleStyle? style,
}) : style = style ?? DSMessageBubbleStyle(),
super(key: key);
}) : style = style ?? DSMessageBubbleStyle();

@override
State<DSTextMessageBubble> createState() => _DSTextMessageBubbleState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ class DSUnsupportedContentMessageBubble extends StatelessWidget {
final DSMessageBubbleStyle style;

DSUnsupportedContentMessageBubble({
Key? key,
super.key,
required this.align,
this.leftWidget,
this.text,
this.replyContent,
this.overflow = TextOverflow.ellipsis,
this.borderRadius = const [DSBorderRadius.all],
DSMessageBubbleStyle? style,
}) : style = style ?? DSMessageBubbleStyle(),
super(key: key);
}) : style = style ?? DSMessageBubbleStyle();

@override
Widget build(BuildContext context) {
Expand Down
35 changes: 19 additions & 16 deletions lib/src/widgets/chat/ds_url_preview.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,26 @@ class _DSUrlPreviewState extends State<DSUrlPreview>
}

Widget _buildPreview() {
return GestureDetector(
onTap: () => launchUrl(
Uri.parse(_controller.urlPreview.value!.url),
mode: LaunchMode.inAppWebView,
).ignore(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (_controller.urlPreview.value?.image != null)
_buildImage(
path: _controller.urlPreview.value!.image!,
return Material(
color: Colors.transparent,
child: InkWell(
onTap: () => launchUrl(
Uri.parse(_controller.urlPreview.value!.url),
mode: LaunchMode.inAppWebView,
).ignore(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (_controller.urlPreview.value?.image != null)
_buildImage(
path: _controller.urlPreview.value!.image!,
),
_buildBody(
title: _controller.urlPreview.value?.title,
description: _controller.urlPreview.value?.description,
),
_buildBody(
title: _controller.urlPreview.value?.title,
description: _controller.urlPreview.value?.description,
),
],
],
),
),
);
}
Expand Down
5 changes: 2 additions & 3 deletions lib/src/widgets/chat/ds_weblink_message_bubble.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,15 @@ class DSWeblinkMessageBubble extends StatelessWidget {
final DSReplyContent? replyContent;

DSWeblinkMessageBubble({
Key? key,
super.key,
required this.title,
required this.text,
required this.align,
required this.url,
this.replyContent,
this.borderRadius = const [DSBorderRadius.all],
DSMessageBubbleStyle? style,
}) : style = style ?? DSMessageBubbleStyle(),
super(key: key);
}) : style = style ?? DSMessageBubbleStyle();

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/chat/typing/ds_typing_dot.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class DSTypingDot extends StatelessWidget {
///
/// Set the dot size and color using the parameters [size] and [color]
const DSTypingDot({
Key? key,
super.key,
required this.color,
required this.size,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ class DSTypingDotAnimation extends StatefulWidget {
/// To change the animation speed use [animationTime]
/// To set the dot ascent level use [tweenEndAnimation]
const DSTypingDotAnimation({
Key? key,
super.key,
this.numberDots = 3,
this.size = 7,
this.padding = 2,
this.animationTime = DSUtils.defaultAnimationDuration,
required this.color,
this.tweenEndAnimation = -3,
}) : super(key: key);
});

@override
State<DSTypingDotAnimation> createState() => _DSTypingDotAnimationState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ class DSTypingAnimationMessageBubble extends StatelessWidget {
///
/// Use [align] left or right to position typing on screen
DSTypingAnimationMessageBubble({
Key? key,
super.key,
required this.align,
DSMessageBubbleStyle? style,
}) : style = style ?? DSMessageBubbleStyle(),
super(key: key);
}) : style = style ?? DSMessageBubbleStyle();

@override
Widget build(BuildContext context) {
Expand Down
Loading

0 comments on commit fbf3383

Please sign in to comment.