Skip to main content

Posts

Showing posts from July, 2025

Referral & Deep linking

  Plugins :  app_links: android_play_install_referrer: Link to share :  https://play.google.com/store/apps/details?id=com.erer&referrer=referral_code%3DTEST123 Flutter Code :  import 'package:app_links/app_links.dart' ; import 'package:android_play_install_referrer/android_play_install_referrer.dart' ; import 'package:flutter/foundation.dart' ; import 'package:shared_preferences/shared_preferences.dart' ; class DeepLinkService {   static const String _referralKey = 'referral_code' ;   static final AppLinks _appLinks = AppLinks ();   static Future < void > initDeepLinks () async {     debugPrint ( 'Initializing deep links...' );     // 1️⃣ Handle real-time deep/link stream     try {       final Uri ? initialUri = await _appLinks . getInitialAppLink ();       if ( initialUri != null ) {         debugPrint ( 'Initial deep link: $initialUri'...