ListUic<T> constructor

ListUic<T>({
  1. Key? key,
  2. required ListUicController<T> controller,
  3. required Widget itemBuilder(
    1. T item
    ),
  4. Icon emptyDataIcon = const Icon(Icons.sentiment_dissatisfied, size: 96.0, color: Colors.black26),
  5. String emptyDataText = 'No results',
  6. Widget? emptyDataView,
  7. Icon emptyErrorIcon = const Icon(Icons.error_outline, size: 96.0, color: Colors.black26),
  8. String emptyErrorText = 'Error loading data',
  9. Widget? emptyErrorView,
  10. String emptyProgressText = 'Loading...',
  11. Widget? emptyProgressView,
  12. Widget? nextPageProgressView,
  13. String errorText = 'Error loading data',
  14. Color errorColor = Colors.redAccent,
})

Implementation

ListUic({
  Key? key,
  required this.controller,
  required this.itemBuilder,
  this.emptyDataIcon = const Icon(
    Icons.sentiment_dissatisfied,
    size: 96.0,
    color: Colors.black26,
  ),
  this.emptyDataText = 'No results',
  Widget? emptyDataView,
  this.emptyErrorIcon = const Icon(
    Icons.error_outline,
    size: 96.0,
    color: Colors.black26,
  ),
  this.emptyErrorText = 'Error loading data',
  Widget? emptyErrorView,
  this.emptyProgressText = 'Loading...',
  Widget? emptyProgressView,
  Widget? nextPageProgressView,
  this.errorText = 'Error loading data',
  this.errorColor = Colors.redAccent,
})  : assert(emptyDataView != null || emptyDataText.isNotEmpty),
      emptyDataView = emptyDataView ??
          ListUicEmptyView(
              controller: controller,
              icon: emptyDataIcon,
              text: emptyDataText),
      emptyErrorView = emptyErrorView ??
          ListUicEmptyView(
              controller: controller,
              icon: emptyErrorIcon,
              text: emptyErrorText),
      emptyProgressView = emptyProgressView ??
          ListUicEmptyProgressView(text: emptyProgressText),
      nextPageProgressView =
          nextPageProgressView ?? const ListUicNextPageProgressView(),
      super(key: key);