resolveEmptyBuilderToStateProperty function

EndlessStateProperty resolveEmptyBuilderToStateProperty(
  1. StatelessWidgetResolver? builder
)

Implementation

EndlessStateProperty resolveEmptyBuilderToStateProperty(
  StatelessWidgetResolver? builder,
) {
  return _resolveBuilderToStateProperty(
    builder,
    (StatelessWidgetResolver builder) =>
        EndlessStateProperty.resolveWith((context, states) {
      if (states.contains(EndlessState.empty) &&
          !states.contains(EndlessState.loading)) {
        return builder(context);
      }
      return null;
    }),
  );
}