init method
Initializes Branch link handling.
Implementation
Future<void> init({
bool useTestKey = false,
bool enableLog = false,
bool disableTrack = false,
DeferredDeepLink? onLinkReceived,
}) async {
await FlutterBranchSdk.init(
useTestKey: useTestKey,
enableLogging: enableLog,
disableTracking: disableTrack);
FlutterBranchSdk.listSession().listen((data) {
try {
DeepLinkNavigator().navigateToScreen(data);
} on Exception catch (_) {}
try {
if (data.isNotEmpty) {
onLinkReceived?.call(data);
}
} on Exception catch (_) {}
});
}