Skip to content
pubscout

receive_intent

0.2.8, released 3 months ago by bhikadia.com

Flutter plugin to expose Android Intents to Dart, including initial and new intents, and return results.

WASM-ready
$ flutter pub add receive_intent
Source repository

What it does

It forwards the Intent that started the Flutter activity to Dart, and streams any subsequent Intents received while the activity is running. It also exposes caller info and allows sending a result back to the originating activity.

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

Use it when

  • You need to handle deep links or app links on Android
  • You want to receive share intents or any custom intent actions
  • You need to return a result to an Android activity that started Flutter for result

Skip it when

  • You only need to handle standard deep links (uni_links covers that)
  • You need cross-platform intent handling (iOS not supported)

Strengths

  • Full access to Android Intent data, including extras, action, categories, and component info
  • Provides a stream for real-time intent handling
  • Supports returning results to the calling activity

Weaknesses

  • Android-only, no iOS support
  • Requires manual intent-filter configuration in AndroidManifest
  • No code generation or declarative API

Setup

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

Add intent-filter to AndroidManifest.xml, import package, call ReceiveIntent.getInitialIntent() and listen to ReceiveIntent.receivedIntentStream. No build_runner needed.

import 'package:receive_intent/receive_intent.dart';

Future<void> init() async {
  final intent = await ReceiveIntent.getInitialIntent();
  ReceiveIntent.receivedIntentStream.listen((intent) {
    // handle new intent
  });
}

Alternatives

Packages that do the same job and could replace receive_intent.