smart_deep_links 1.0.0 copy "smart_deep_links: ^1.0.0" to clipboard
smart_deep_links: ^1.0.0 copied to clipboard

A comprehensive Flutter package for handling standard and deferred deep links with custom backend integration and fingerprinting support.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:smart_deep_links/smart_deep_links.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  
  // Initialize the singleton
  await SmartDeepLinks().initialize(
    baseUrl: 'https://your-saas-domain.com',
    paymentToken: 'your-payment-token',
    onLink: (uri, isDeferred) {
      debugPrint('Deep Link Received: $uri (Deferred: $isDeferred)');
      // Handle navigation here
    },
    onError: (message) {
      debugPrint('Deep Link Error: $message');
    },
  );

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Smart Deep Links Example')),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ElevatedButton(
                onPressed: () async {
                  await SmartDeepLinks().createAndShareLink(
                    targetPath: '/product/123',
                    title: 'Check out this product!',
                  );
                },
                child: const Text('Share Product Link'),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () async {
                  await SmartDeepLinks().createAndShareQRCode(
                    targetPath: '/invite/friend',
                    title: 'Scan to Join!',
                  );
                },
                child: const Text('Share QR Code'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
2
likes
140
points
9
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter package for handling standard and deferred deep links with custom backend integration and fingerprinting support.

Homepage

License

MIT (license)

Dependencies

app_links, device_info_plus, dio, flutter, package_info_plus, path, path_provider, share_plus, shared_preferences

More

Packages that depend on smart_deep_links

Packages that implement smart_deep_links