I am using firebase realtime database with my Flutter Mobile Application. I am saving realtime data from an IoT device, a cloud function analyzes the data and generates analytics for my data on daily basis. As in following Database Structure, where "UsersData" is the root node, followed by user-uid and then his realtime readings and analytics.

Analytics are nested/saved as in following tree. Analytics contains data properly laid yearly as follow.

I want to fetch data for only single day, when I run the following query on Android it works totally fine and it return me data for single day. But on iOS it returns data for entire node.
/// Getting Analytics for today Data
Future getAnalyticsforSelectedDate({
required String uid,
required DateTime selectedDate,
}) async {
String selectedYear = selectedDate.year.toString();
String selectedMonth = selectedDate.month.toString();
String selectedDay = selectedDate.day.toString();
// Format Add a zero in front of single digit date such as
// e.g. Turn 9/9/2023 into 09/09/2023
if (selectedDate.day >= 10) {
selectedDay = selectedDate.day.toString();
} else {
selectedDay = "0" + selectedDate.day.toString();
}
if (selectedDate.month >= 10) {
selectedMonth = selectedDate.month.toString();
} else {
selectedMonth = "0" + selectedDate.month.toString();
}
try {
final data = await _db
.child(
"UsersData/$uid/analytics/$selectedYear/$selectedMonth/$selectedDay")
.get();
log("Date = $selectedDay/$selectedMonth/$selectedYear");
log("${Platform.isIOS ? "IOS Results" : "Android Result"}:: ${data.value} ");
return data.value;
} catch (e) {
log("@getAnalyticsforSelectedDate " + e.toString());
}
}
I am using latest firebase packages with Flutter Version 3.7.10.
firebase_auth: ^4.9.0
firebase_core: ^2.15.1
firebase_core_platform_interface: ^4.8.0
firebase_database: ^10.2.5
firebase_storage: ^11.2.6
I have tried running on iOS 16 and iOS 12 to see if it was a compatibility issue with old or new iOS version(same results on both).
Here what happens when I run the code for Date 18/09/2023 on Android

Here is the log for iOS on Date 18/09/2023

child(...)? If so, can you show the updated code? It'd also be good to see the value you get back. So if youprint(data.value), what do you get on iOS? And on other platforms?get()and we recall having a similar issue there at some point. Can you try to see ifoncedoes work consistenly across platforms? If so, that'd confirm it's a resurfacing bug inget()on iOS.