DEV Community

Discussion on: Understanding Streams in Flutter (Dart)

Collapse
 
oufle profile image
oufle

i use stream builder and it works perfectly on the first time and when i back to my previous page and come back again it show me bad.state: flutter already has been used can you help me

return StreamBuilder(
initialData: StateProvider().isAnimating,
stream: stateBlock.animationStatus,

  builder: (context, snapshot) {
    snapshot.data ? forward() : reverse();
      return ScaleTransition(
        scale: scaleAnimation,
        child: FadeTransition(
          opacity: fadeAnimation,
          child: CarDetails(),
        ),
      );

  }
);