In pure story terms, there is space for Nightwing to exist  while Batman v Superman: Dawn of Justice and Suicide Squad teased a dead Robin, it wasn't definitively stated that this was Dick Grayson, and Ben Affleck playing an older Batman allows for a former Robin to have grown into an adult himself.