UPDATE
i want to retrieve user log history in realtime from path Staff=>randomID1=>log=> randomID2 i want to display the the data from randomID2 in showDialog.
my path : final databaseRef = FirebaseDatabase.instance.reference().child('Staff');
child: FirebaseAnimatedList(
query: dataRef,
itemBuilder: (BuildContext context, DataSnapshot snapshot,
Animation<double> animation, int index) {
var log = snapshot.value['log'];
var dates = log.keys.toList();
var key = dates[index];
return Card(
child: ListTile(
title: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('Email : ${snapshot.value['email']}'),
Text(
'Mail Status : ${snapshot.value['mail-status'].toString()}'),
Text('Date : ${snapshot.value['date']}'),
Text('Time : ${snapshot.value['time']}'),
Text(snapshot.value['log'][key]['current-date']),
Card(
child: ListTile(
subtitle: Column(
children: <Widget>[
for(var i = 0; i<log.length; i++)...[
Text(snapshot.value['log'][key]['current-date'])
],
],
),
),
),
],
),
),
);
})),

my error:
Exception has occurred.NoSuchMethodError (NoSuchMethodError: The method '[]' was called on null.Receiver: nullTried calling: []("current-date"))
