generateLink method
Generate a Grovs link with the specified parameters
Returns the generated link URL as a String
Throws GrovsException if link generation fails
Example:
final link = await Grovs().generateLink(
GenerateLinkParams(
title: 'Check this out',
subtitle: 'Amazing content',
imageURL: 'https://example.com/image.png',
data: {'screen': 'product', 'productId': '123'},
tags: ['promotion'],
tracking: TrackingParams(
utmCampaign: 'spring_sale',
utmSource: 'email',
utmMedium: 'newsletter',
),
customRedirects: CustomRedirects(
ios: CustomLinkRedirect(url: 'https://my_website.com/ios', openAppIfInstalled: true),
android: CustomLinkRedirect(url: 'https://my_website.com/android', openAppIfInstalled: true),
desktop: CustomLinkRedirect(url: 'https://my_website.com/desktop', openAppIfInstalled: false),
),
),
);
Implementation
Future<String> generateLink(GenerateLinkParams params) {
return GrovsPlatform.instance.generateLink(params);
}