Skip to content
pubscout

referrer

1.1.0, released 2 years ago by uekoetter.dev

Read referrer information for incoming deep links on Android and iOS.

$ flutter pub add referrer
Source repository

What it does

A Flutter plugin that allows you to read various referrer information when the app is opened via a deep link. It uses native APIs like NSUserActivity#referrerUrl on iOS and Intent.EXTRA_REFERRER on Android. On unsupported platforms, calls result in a no-op.

AI-written summary of version 1.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to know the webpage or application URL that caused your app to open via a deep link
  • You are handling deep links with Flutter's mechanism or packages like app_links and need referrer details

Skip it when

  • You need to track app install referrers rather than deep link referrers
  • You are targeting platforms other than Android and iOS

Strengths

  • Simple API to fetch referrer information
  • Works well with existing deep-linking solutions and routing libraries

Weaknesses

  • Referrer information is subject to platform limitations and browser referrer policies
  • May not be available for certain browsers like Firefox or depending on user intent
  • Does not support install referrer tracking

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
0

No complex configuration required. Platforms other than Android and iOS are treated as no-ops.

class ReferrerObserver with WidgetsBindingObserver {
  @override  
  Future<bool> didPushRouteInformation(RouteInformation routeInformation) async {
    final referrerInfo = await Referrer().getReferrer();
    return false;
  }
}