Skip to content

Commit f814dc9

Browse files
authored
LiveList: fixed defaultBuilder (#333)
1 parent c73c83e commit f814dc9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/src/utils/parse_live_list.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -346,14 +346,14 @@ class ParseLiveListWidget<T extends ParseObject> extends StatefulWidget {
346346
_ParseLiveListWidgetState<T>(query, removedItemBuilder);
347347

348348
static Widget defaultChildBuilder<T extends ParseObject>(
349-
BuildContext context, bool failed, T loadedData) {
349+
BuildContext context, ParseLiveListElementSnapshot<T> snapshot) {
350350
Widget child;
351-
if (failed) {
351+
if (snapshot.failed) {
352352
child = const Text('something went wrong!');
353-
} else if (loadedData != null) {
353+
} else if (snapshot.hasData) {
354354
child = ListTile(
355355
title: Text(
356-
loadedData.get(keyVarObjectId),
356+
snapshot.loadedData.get(keyVarObjectId),
357357
),
358358
);
359359
} else {

0 commit comments

Comments
 (0)