David
David

Reputation: 1231

Does Flutter support Firebase Dynamic Links?

If yes, how to implement the Firebase Dynamic Links in Flutter? I want users to open a Dynamic Link on iOS or Android, and then they can be taken directly to the linked content in my app.

Upvotes: 0

Views: 1458

Answers (2)

JSAN L.
JSAN L.

Reputation: 492

Firebase Dynamic Links are now supported!
Link to the pub page: https://pub.dartlang.org/packages/firebase_dynamic_links

Upvotes: 1

Anilcan
Anilcan

Reputation: 149

It is deep link. Yes, you can do it in Flutter. I find a example code for handler. You should set this handler in your application routes.

/// Handles deep links into the app
/// To test on Android:
/// 
/// `adb shell am start -W -a android.intent.action.VIEW -d "fluro://deeplink?path=/message&mesage=fluro%20rocks%21%21" com.goposse.fluro`
var deepLinkHandler = new Handler(handlerFunc: (BuildContext context, Map<String, List<String>> params) {
  String message = params["message"]?.first;
  String colorHex = params["color_hex"]?.first;
  String result = params["result"]?.first;
  Color color = new Color(0xFFFFFFFF);

  if (colorHex != null && colorHex.length > 0) {
    color = new Color(ColorHelpers.fromHexString(colorHex));
  }

  return new DemoSimpleComponent(message: "DEEEEEP LINK!!!", color: color, result: result);  
});

Source: https://github.com/goposse/fluro/tree/master/example

Upvotes: 0

Related Questions