experiment with streambuilder

This commit is contained in:
Salvatore Giordano
2021-06-01 17:24:26 +02:00
parent 06bf2cdfe5
commit c10166dbff
13 changed files with 342 additions and 234 deletions
@@ -26,11 +26,14 @@ class ChannelName extends StatelessWidget {
final client = StreamChat.of(context);
final channel = StreamChannel.of(context).channel;
return StreamBuilder<Map<String, dynamic>>(
return BetterStreamBuilder<Map<String, Object?>>(
stream: channel.extraDataStream,
initialData: channel.extraData,
builder: (context, snapshot) =>
_buildName(snapshot.data!, channel.state?.members, client),
builder: (context, snapshot) => _buildName(
snapshot,
channel.state?.members,
client,
),
);
}