Enhancement #160 #161 (Make phone numbers and email addresses interactive) #178
+81
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Made phone number and email address field interactive by opening the respective phone/messagin/mail app the user selects, after tapping on the phone number and email address field.
How I did it
I used a flutter package
url_launcher
for the purpose. In the already provided GestureDetector widget for the phone number field (custom_card.dart), in the onTap function, I used the prebuilt methods from the package to open the phone and messaging or email app with the phone number/email precomposed as soon as the user selects the appHow to verify it
For verification, just tap on the phone number of the user, whose profile page you are on, currently. It opens an intent bottom sheet asking us to select the respective phone number or messaging app we want to use (get redirected to). Select any. It will open the selected app and we can see the recipient's field already composed with the same phone number.
Description for the changelog
Made the phone number and email address field interactive by providing phone number, messaging and email app options for the users to select and get redirected to the selected app.