-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Added support for mailto: links. #8
Conversation
… be a linked "piotapps@gmail.com".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Maybe we should add a new EmailElement to reflect this, as it's possible to have custom handling for emails (should also add on EmailTap to the widget portion)?
…l and added a separate EmailCallback
Resolved your comments, one discussion point left (see the TODO) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff! I'll test it later tonight before approving. Great work!
@@ -17,8 +20,12 @@ class Linkify extends StatelessWidget { | |||
final TextStyle linkStyle; | |||
|
|||
/// Callback for tapping a link | |||
final LinkCallback onOpen; | |||
final LinkCallback onLinkOpen; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking change, will require a major bump.
@@ -13,6 +13,19 @@ class LinkElement extends LinkifyElement { | |||
} | |||
} | |||
|
|||
/// Represents an element containing an email address | |||
class EmailElement extends LinkifyElement { | |||
final String emailAddress; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a case where the email address != displayed address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not now I think.. But it will be when support for ?subject=...&body=...
is added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's still gonna be the same though, since subject, body, etc is simply gonna be properties (not shown)
description: Turns text URLs into clickable inline links in text for Flutter. | ||
version: 1.1.1 | ||
description: Turns text URLs and Mailto links into clickable inline links in text for Flutter. | ||
version: 1.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version: 1.2.0 | |
version: 2.0.0 |
To match the breaking change above.
We could support both onOpen and onOpenLink (and deprecate onOpen). To to you to make the decision!
@Cretezy Will have a look later. What about the TODO mentioned at flutter_linkify.dart#87 |
I'll take a look at this later tonight. Looks great thogh! |
@Cretezy any updates? |
Totally forgot about this, sorry! Will check when I'm home. |
Merged. Will prepare 2.0.0 release, I want to change the API a little. Thanks again! Great work |
EG: "mailto:piotapps@gmail.com" will be a linked "piotapps@gmail.com".
Later TODO: support for
?subject=...&body=...