vela_links 0.1.1
vela_links: ^0.1.1 copied to clipboard
Deep links, app links, deferred deep links, short links, share links, QR codes and link tracking for Flutter. A Firebase Dynamic Links alternative.
vela_links #
Deep links, app links (Android App Links and iOS Universal Links), deferred deep links, short share links, QR codes and link tracking for Flutter apps, powered by the Vela Links service. A link opens the right screen in your app, even when the app is not installed yet. It is a simple alternative to Firebase Dynamic Links and Branch.
Features #
- Deep links and app links: open a screen in your app from a web link, a QR code or a custom scheme.
- Deferred deep links: a person who installs the app from a link lands on the right screen at first launch.
- Short share links: create links from inside the app and share them anywhere.
- QR codes: every link and app gets a trackable QR code.
- Link tracking: see taps, QR scans, installs and opens per link in the dashboard.
1. Set up your app in the dashboard #
Sign up at https://deeplinks.velaapps.in, add your app (package name, signing fingerprint, Apple Team ID, store links) and copy the SDK key. The dashboard shows the exact Android and iOS settings for your app.
2. Install #
flutter pub add vela_links
3. Use #
import 'package:vela_links/vela_links.dart';
await VelaLinks.init(apiKey: 'vl_...', baseUrl: 'https://api.links.velaapps.in');
// A link opened your app (or matched your first launch after install)
VelaLinks.instance.onLink.listen((link) {
// link.route, link.params, link.deferred
});
// Create a short link from inside the app
final url = await VelaLinks.instance.createLink(route: '/invite', params: {'id': '42'});
If a link arrives before you start listening, read it once with VelaLinks.instance.consumePendingLink().
4. Platform setup #
- Android: an intent filter for your link domain and your URI scheme (shown in the dashboard), and the Play Install Referrer is read automatically for deferred links.
- iOS: the Associated Domains entitlement
applinks:<your link domain>and your URI scheme.
Good to know #
- The SDK key identifies your app. It can create links and report opens for that one app, and nothing else. It is meant to live in your app, like an analytics key, so it is rate-limited and only works from your own app id. You can rotate it in the dashboard.
baseUrlmust behttps://(plainhttp://only forlocalhostor the Android emulator10.0.2.2).- Every call has a time limit (
requestTimeout, default 10 seconds). Failures raiseVelaLinksExceptionand never stop your app starting. - Treat
link.routeandlink.paramsas untrusted input, like any deep link: check the route against the screens you allow, and never put secrets in link params. - On iOS the first launch reads a one-time token from the clipboard (iOS may show its paste notice) and clears it after a match.
- Call
VelaLinks.instance.dispose()to stop listening. Callinginitagain replaces the previous instance. reportOpens: falseturns off open and QR-scan reporting.
License #
MIT. See LICENSE.