Skip to content

Commit

Permalink
Merge pull request #282 from takenet/develop
Browse files Browse the repository at this point in the history
[Release] 0.2.4
  • Loading branch information
mpamaro authored Sep 19, 2024
2 parents b6b3db6 + e07d2d7 commit 8aabb81
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.4

- [DSSecurityService] Add service to manage security features.
-
## 0.2.3

- [DSPhoneInput] Add support to select current country code.
Expand Down
1 change: 1 addition & 0 deletions lib/blip_ds.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export 'src/services/ds_dialog.service.dart' show DSDialogService;
export 'src/services/ds_file.service.dart' show DSFileService;
export 'src/services/ds_localization.service.dart' show DSLocalizationService;
export 'src/services/ds_media_format.service.dart' show DSMediaFormatService;
export 'src/services/ds_security.service.dart' show DSSecurityService;
export 'src/services/ds_toast.service.dart' show DSToastService;
export 'src/themes/colors/ds_colors.theme.dart' show DSColors;
export 'src/themes/colors/ds_dark_colors.theme.dart' show DSDarkColors;
Expand Down
3 changes: 3 additions & 0 deletions lib/src/services/ds_security.service.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
abstract class DSSecurityService {
static bool isSelectableTextsEnabled = true;
}
5 changes: 4 additions & 1 deletion lib/src/widgets/texts/ds_text.widget.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';

import '../../services/ds_security.service.dart';
import '../../themes/colors/ds_colors.theme.dart';
import '../../themes/texts/utils/ds_font_weights.theme.dart';
import '../../utils/ds_linkify.util.dart';
Expand Down Expand Up @@ -58,7 +59,9 @@ class DSText extends StatelessWidget {

@override
Widget build(BuildContext context) =>
isSelectable ? _buildSelectableText() : _buildText();
DSSecurityService.isSelectableTextsEnabled && isSelectable
? _buildSelectableText()
: _buildText();

InlineSpan get _formattedText {
List<InlineSpan>? formattedText;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: blip_ds
description: Blip Design System for Flutter.
version: 0.2.3
version: 0.2.4
homepage: https://github.com/takenet/blip-ds-flutter#readme
repository: https://github.com/takenet/blip-ds-flutter

Expand Down
2 changes: 1 addition & 1 deletion sample/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.2.0"
version: "0.2.4"
boolean_selector:
dependency: transitive
description:
Expand Down

0 comments on commit 8aabb81

Please sign in to comment.