listen method

Widget listen({
  1. required Widget ready(
    1. T
    ),
  2. Widget loading = const SizedBox(),
  3. Widget error(
    1. dynamic
    ) = EmptyErrorFunction,
})

Similar to when but Only listen and display data. Default to Display blank when there is loading and error But can still customize

Implementation

Widget listen({
  required Widget Function(T) ready,
  Widget loading = const SizedBox(),
  Widget Function(dynamic) error = EmptyErrorFunction,
}) {
  return FutureManagerBuilder<T>(
    futureManager: this,
    ready: (context, data) => ready(data),
    loading: loading,
    error: error,
  );
}