trackLaunch static method
void
trackLaunch({
- required LaunchType type,
- required Uri uri,
- dynamic onTrack(
- LaunchType type,
- Uri uri
Tracks a successful launch event.
Implementation
static void trackLaunch({
required LaunchType type,
required Uri uri,
Function(LaunchType type, Uri uri)? onTrack,
}) {
_launchCounts[type] = (_launchCounts[type] ?? 0) + 1;
_lastLaunchTimestamps[type] = DateTime.now();
developer.log(
'Launch tracked: Type=$type, URI=$uri, Count=${_launchCounts[type]}',
name: 'Launchify.Analytics',
);
onTrack?.call(type, uri);
}