flutter transition between screens in a streambuilder code example
Example: flutter transition between screens in a streambuilder
StreamBuilder(
stream: stream,
builder: (context, snapshot) {
return AnimatedSwitcher(
duration: const Duration(seconds: 4),
child: snapshot.hasData
? Text(snapshot.data)
: CircularProgressIndicator();
);
}
),