The news comes as actor Ray Fisher revealed WarnerMedia has opened an investigation into controversial reshoots for 'Justice League.'
Ben Affleck will again be donning Batman's iconic cape and cowl. ET can confirm that Affleck has agreed to return as the Caped Crusader for a final time for The Flash, a stand-alone film, alongside Ezra Miller, who stars as the super-fast superhero.
Affleck -- who previously delivered his dark take on the iconic vigilante in Batman v Superman and Justice League -- will be appearing in a cameo role. He previously cameoed as Batman for a brief scene in 2016's Suicide Squad.
After long planning on portraying Batman in a stand-alone film of his own, Affleck eventually moved on from the role, and Robert Pattinson was cast to play a young Bruce Wayne in director Matt Reeves' The Batman.
ET has learned that Affleck's appearance in The Flash will have no impact on Pattinson’s take on the character, as The Batman is a completely separate project and is still considered the future of the franchise.
The Flash will feature the titular speedster using his super speed to crash through various dimensions and timelines, and is expected to include multiple iterations of several DC heroes who have been featured on the big screen over the years.
It was previously announced that Michael Keaton is in talks to reprise his take on the Batman character, which he portrayed in director Tim Burton's 1989 classic Batman and the 1992 sequel, Batman Returns.
Miller and Affleck starred in 2017's Justice League, which was fraught with production problems almost from the start.
Whedon stepped in to finish reshoots on Justice League after the film's original director, Zack Snyder, had to step away due to the death of his daughter. In late June, Fisher took to Twitter and alleged that Whedon's "on-set treatment of the cast and crew of Justice League was gross, abusive, unprofessional, and completely unacceptable."
He further alleged that Whedon was "enabled, in many ways" by producers Geoff Johns and Jon Berg.
On Thursday, Fisher tweeted that WarnerMedia is looking into the allegations by hiring independent investigators.
"After 5 weeks of interviews with various cast/crew, @WarnerMedia has officially launched an independent third-party investigation to get to the heart of the toxic and abusive work environment created during Justice League reshoots," Fisher wrote. "This is a MASSIVE step forward!"
"I believe this investigation will show that Geoff Johns, Joss Whedon, Jon Berg (and others) grossly abused their power during the uncertainty of AT&T’s merger with Time Warner," he continued. "Thank you @WarnerMedia and @ATT for making strides to ensure a safer workplace for all!"