LaunchService class
Service for launching URLs, emails, phone calls, and SMS.
This service provides a clean, testable API over the url_launcher package,
automatically handling URI parsing, error catching, and logging.
Constructors
- LaunchService({LaunchAdapter? adapter})
- Creates a new launch service instance.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
canLaunch(
String url) → Future< bool> - Checks if a URL can be launched.
-
email(
String address, {String? subject, String? body}) → Future< bool> - Launches an email client to send an email.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
phone(
String number) → Future< bool> - Launches the device's phone dialer.
-
sms(
String number, {String? body}) → Future< bool> - Launches the device's SMS messaging app.
-
toString(
) → String -
A string representation of this object.
inherited
-
url(
String url, {LaunchMode mode = LaunchMode.externalApplication}) → Future< bool> - Launches a URL using the specified mode.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited