defaultChildBuilder<T extends ParseObject> static method

Widget defaultChildBuilder<T extends ParseObject>(
  1. BuildContext context,
  2. ParseLiveListElementSnapshot<T> snapshot
)

Implementation

static Widget defaultChildBuilder<T extends sdk.ParseObject>(
    BuildContext context, sdk.ParseLiveListElementSnapshot<T> snapshot) {
  Widget child;
  if (snapshot.failed) {
    child = const Text('something went wrong!');
  } else if (snapshot.hasData) {
    child = ListTile(
      title: Text(
        snapshot.loadedData!.get<String>(sdk.keyVarObjectId)!,
      ),
    );
  } else {
    child = const ListTile(
      leading: CircularProgressIndicator(),
    );
  }
  return child;
}