Play Framework 2.5 : Custom Filter : method mat in trait Filter of type => akka.stream.Materializer is not defined

Hi,
I am migrating from Play 2.4 to 2.5. The below code was working fine in 2.4 play. But getting error from the same code in 2.5 Play.

MyOverridingFilter object creation impossible, since method mat in trait Filter of type => akka.stream.Materializer is not defined.

My code is as below:
Also I am not seeing any stream package is there under akka.

 object Global extends WithFilters {
/*some code here*/
override def doFilter(next: EssentialAction): EssentialAction = {
    Filters(super.doFilter(next), MyOverridingFilter)
  }
}

object MyOverridingFilter extends Filter {
/*some code here*/
}


Play Version: 2.5.0

Can someone please help here