Keiynan Lonsdale
“The Flash” actor Keiynan Lonsdale plays the role of Bram Greenfeld in the upcoming comedy-drama film “Simon vs. The Homo Sapiens Agenda.” Pictured: Lonsdale attends the “Allegiant” New York Premiere at AMC Loews Lincoln Square 13 theater on March 14, 2016 in New York City. Getty Images/Mark Sagliocco

“The Flash” actor Keiynan Lonsdale has been cast in the upcoming comedy-drama film “Simon vs. The Homo Sapiens Agenda.”

The film, which is based on the young adult novel of the same title by Becky Albertalli, is directed by Greg Berlanti, who serves as an executive producer on The CW’s “The Flash.” The movie tells the story of a young gay teen, Simon (Nick Robinson), who takes a novel approach to coming out to his classmates. According to Deadline, Lonsdale plays the role of Bram Greenfeld, one of Simon’s friends and classmates.

Shortly after Lonsdale’s casting was announced, Albertalli took to Twitter to express her delight over the news.

Lonsdale replied to Albertalli’s tweet, writing that he’s “lucky” to be part of her novel’s film adaptation.

READ: Keiynan Lonsdale talks about his off-screen relationships with his “The Flash” co-stars

It’s unclear what exactly drew Lonsdale to the movie, but because “Simon vs. The Homo Sapiens Agenda” is a coming-out story, the Australian actor — who just came out as bisexual last month — could definitely relate to it.

Lonsdale came out as bisexual in a lengthy Instagram post he shared on May 13. In it, Lonsdale, who plays Wally West/Kid Flash on “The Flash,” wrote that he likes both girls and guys. He admitted that he spent several years of his life hating himself and thinking that he was less valuable because he was different. “The Divergent Series” actor shared that he was able to accept who he really is a couple of years ago. Although that self-acceptance saved his life, he revealed that he’s met a new road block and feels kind of lost.

Lonsdale wrote that he’s now done being insecure, ashamed and scared, sharing that seeing a lot of young people being their best and truest selves inspired him to fully embrace his true self. The actor ended his post by saying he hopes that everyone can learn to accept who they really are and not judge people who are not exactly the same as they are. “The truth is we are all family, we’re all one. Just love,” Lonsdale wrote.

“Simon vs. The Homo Sapiens Agenda,” which also stars Katherine Langford, Miles Heizer, Alexandra Shipp, Jennifer Garner, Josh Duhamel and Tony Hale, is scheduled to hit theaters on March 16, 2018.