Opens URLs, apps, settings, stores, maps, messengers, email/SMS/call screens; OAuth sign-in; deep links. All 6 platforms, returns false instead of crashing. ULaunch.url("https://x.com")
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
links
→ Stream<
Uri> -
Deep links that arrive while the app is running.
ULaunch.links.listen(openLink)no setter -
onInAppClosed
→ Stream<
void> -
Fires when the user closes the in-app browser (iOS; Android when the app comes back).
ULaunch.onInAppClosed.listen((_) => refreshPayment())no setter
Static Methods
-
authenticate(
String url, {required String callbackScheme, bool ephemeral = false, Duration timeout = const Duration(minutes: 5)}) → Future< Uri?> -
OAuth / SSO: opens
urland returns the redirect tocallbackScheme, null if cancelled. Android/desktop custom schemes:dart run u:app deep-link myapp.await ULaunch.authenticate(authUrl, callbackScheme: "myapp") -
call(
String number) → Future< bool> -
Opens the dialer with
number; USSD like *140# works (Android/iOS; desktops need a phone app).ULaunch.call("*140#") -
canOpen(
String url) → Future< bool> -
True when something can open
url. iOS needs the scheme listed:dart run u:app query-schemes.await ULaunch.canOpen("tg://") -
chat(
UMessenger messenger, String target, {String? text}) → Future< bool> -
Opens a chat in WhatsApp, Telegram, Eitaa, Rubika, Bale, Soroush, Instagram or X (app, else web).
ULaunch.chat(UMessenger.whatsapp, "+989121234567", text: "Hello") -
closeInApp(
) → Future< bool> -
Closes the in-app browser opened by inApp() (Android, iOS); false elsewhere.
ULaunch.closeInApp() -
directions(
double latitude, double longitude, {UMapApp app = UMapApp.system, UTravelMode mode = UTravelMode.driving}) → Future< bool> -
Starts navigation to a place in the chosen map app.
ULaunch.directions(35.7, 51.4, app: UMapApp.waze) -
email(
{List< String> to = const <String>[], List<String> cc = const <String>[], List<String> bcc = const <String>[], String? subject, String? body, bool isHtml = false, List<String> attachments = const <String>[]}) → Future<UComposeResult> -
Opens an email draft; attachments work on Android, iOS, macOS and Windows (not Linux/web).
ULaunch.email(to: ["a@b.com"], subject: "Hi", attachments: [path]) -
external(
String url) → Future< bool> -
Opens
urlin the browser, never inside the app.ULaunch.external(paymentUrl) -
inApp(
String url, {Color? toolbarColor, Color? controlColor, bool showTitle = true, bool readerMode = false}) → Future< bool> -
Opens
urlinside the app: Custom Tabs (Android), Safari view (iOS), new tab (web); macOS/Windows/Linux use the browser.ULaunch.inApp(url, toolbarColor: Colors.teal) -
initialLink(
) → Future< Uri?> -
Deep link that launched the app, or null (web: the page URL). Needs
dart run u:app deep-link myapp.final Uri? link = await ULaunch.initialLink(); -
isInstalled(
String id) → Future< bool> -
True when an app is installed: Android package, iOS/Windows URL scheme, macOS bundle id; always false on web.
ULaunch.isInstalled("com.whatsapp")· iOS/Android:dart run u:app query-schemes -
map(
double latitude, double longitude, {String? label, UMapApp app = UMapApp.system}) → Future< bool> -
Shows a place in Neshan, Balad, Google Maps, Waze, Apple Maps or the default map app (web: Google Maps).
ULaunch.map(35.7, 51.4, label: "Office", app: UMapApp.neshan) -
nativeApp(
String url) → Future< bool> -
Opens
urlonly in a non-browser app (Android 11+, iOS universal links); false otherwise, so you can fall back.if (!await ULaunch.nativeApp(url)) ULaunch.inApp(url) -
onLink(
void onLink(Uri link)) → Future< StreamSubscription< Uri> > -
Calls
onLinkfor the launch link and every later one; the easy way to route deep links.ULaunch.onLink((uri) => UNavigator.push(ProductPage(uri.pathSegments.last))) -
openApp(
String id) → Future< bool> -
Launches an installed app by the same id as isInstalled; false on web.
ULaunch.openApp("com.farsitel.bazaar") -
requestReview(
{String? appId}) → Future< bool> -
Native rating popup on iOS/macOS (the OS may skip it); elsewhere opens the store rating page.
ULaunch.requestReview() -
settings(
[USettingsPage page = USettingsPage.app, String? channelId]) → Future< bool> -
Opens a system settings page (wifi, bluetooth, location, notifications…); falls back to this app's settings. Web: false.
ULaunch.settings(USettingsPage.location) -
sms(
List< String> to, {String? body, List<String> attachments = const <String>[]}) → Future<UComposeResult> -
Opens an SMS draft to one or more numbers; attachments only on iOS; desktops open the phone link app.
ULaunch.sms(["09121234567"], body: "Code: 1234") -
store(
{UAppStore store = UAppStore.auto, String? appId, bool review = false}) → Future< bool> -
Opens this app's store page (auto-detects Play, Bazaar, Myket, App Store, Microsoft Store, Flathub);
reviewopens the rating tab.ULaunch.store(review: true) -
url(
String url, {ULaunchMode mode = ULaunchMode.platformDefault, Map< String, String> headers = const <String, String>{}}) → Future<bool> -
Opens
urlin the browser or the app that handles it (tel:, mailto:, geo:, myapp://…); false if nothing can.await ULaunch.url("https://sinamn75.com") -
withPackage(
String url, String package) → Future< bool> -
Opens
urlin a specific Android app, e.g. "com.farsitel.bazaar"; other platforms ignorepackage.ULaunch.withPackage(url, "org.telegram.messenger")