updateDetails method

Future<void> updateDetails(
  1. HybridModel user
)

called to get the new details marker & eta

Implementation

Future<void> updateDetails(HybridModel user) async {
  var contains = false;
  int? index;
  for (var hybridUser in hybridUsersList) {
    if (hybridUser!.displayName == user.displayName) {
      contains = true;
      index = hybridUsersList.indexOf(hybridUser);
    }
  }
  if (user.latLng == null) {
    _logger.finer('${user.displayName} user.latLng = null');
    return;
  }

  if (contains) {
    await addDetails(user, index: index);
  } else {
    await addDetails(user);
  }
}