navigateToItemDetail method

Future<void> navigateToItemDetail(
  1. RemoteMessage message,
  2. dynamic onClick(
    1. RemoteMessage
    )?,
  3. bool customOnClickAction
)

Implementation

Future<void> navigateToItemDetail(
  RemoteMessage message,
  Function(RemoteMessage)? onClick,
  bool customOnClickAction,
) async {
  final data = message.data;
  if (customOnClickAction) {
    onClick?.call(message);
  } else if (data['type'] == "1") {
    launchUrl(
      Uri.parse(data['url']),
    );
  } else {
    onClick?.call(message);
  }
}