DEV Community

Ramesh-ariu
Ramesh-ariu

Posted on

how to map my data in flutter stream buillder

0

I have a data like below

Data like this

how to I map the data both key and each value in the stream builder.

StreamBuilder(
        stream: _database.orderByKey().onValue
        builder: (BuildContext context, snapshot) {
          final listvalue = <Card>[];
          if (snapshot.hasData) {
            final marketdata = Map<String, dynamic>.from(
                (snapshot.data! as Event).snapshot.value);
            marketdata.forEach((key, value) {

Top comments (0)