Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release] 0.2.4 #282

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading