handleNotificationNavigation method
Handle notification navigation based on the action type
Implementation
Future<void> handleNotificationNavigation(Map<String, dynamic> data) async {
final target = data['target'];
debugPrint('Handling navigation for data ${json.encode(data)}');
if (target == null) {
debugPrint('Target is null, skipping navigation.');
// Default behavior - no specific navigation
return;
}
switch (target) {
case 'screen':
await _handleScreenNavigation(data);
break;
case 'url':
await _handleDeepLink(data);
break;
default:
debugPrint('Unknown target: $target');
}
}