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

feat(atcommons): Atsign string extensions #769

Merged
merged 1 commit into from
Feb 24, 2025
Merged

feat(atcommons): Atsign string extensions #769

merged 1 commit into from
Feb 24, 2025

Conversation

XavierChanth
Copy link
Member

@XavierChanth XavierChanth commented Feb 18, 2025

- What I did

  • Added Atsign string extensions to replace AtUtils.fixAtsign.
    • Using an extension on String allows for values to be null coalesced which previous wasn't possible
  • AtUtils.fixAtsign now calls String.toAtsign (moved to another PR so that at_commons can be published first)

- How I did it

- How to verify it

- Description for the changelog
feat(atcommons): Atsign string extensions

import 'package:at_commons/at_commons.dart';

/// A fully qualified atSign (e.g. @alice)
typedef Atsign = String;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dart 2.13 feature, we are already >=2.15

Copy link
Contributor

@gkc gkc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Will need another PR later to move a subset of at_utils unit tests (which are currently testing AtUtils.fixAtSign) to the at_commons unit test suite

@gkc gkc merged commit 90726c3 into trunk Feb 24, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants