0

Can IconTheme be combined with AnimatedBuilder to create an animated change to all descendent Icons in a flutter tree. This behaviour can be achieved with TextStyles via AnimatedDefaultTextStyle. Can it be done with IconThemeData.

AnimatedBuilder(
  animation: someListener,
  builder: (context, child) => IconTheme(
    data: IconThemeData(
      color: ColorTween(
        begin: Colors.Blue, 
        end: Colors.Red).animate(someListener).value,
     ),
     child: child,
  ),
  child: List(
    children: [
      // list of icons
    ]
  )
) 
Walrus
  • 19,801
  • 35
  • 121
  • 199

0 Answers0