ListPageScaffold<T> constructor

const ListPageScaffold<T>({
  1. Key? key,
  2. required String title,
  3. required String searchHint,
  4. required ValueChanged<String> onSearchChanged,
  5. required AsyncValue<List<T>> provider,
  6. Widget itemBuilder(
    1. BuildContext context,
    2. T item
    )?,
  7. Widget? customBody,
  8. SliverGridDelegate? gridDelegate,
  9. List<Widget> actions = const [],
  10. Widget? sortBar,
  11. String emptyMessage = 'No items found',
  12. Future<void> onRefresh()?,
  13. VoidCallback? onFetchNextPage,
  14. Widget? floatingActionButton,
  15. EdgeInsetsGeometry padding = const EdgeInsets.all(AppTheme.spacingMedium),
  16. bool hideAppBar = false,
})

Implementation

const ListPageScaffold({
  super.key,
  required this.title,
  required this.searchHint,
  required this.onSearchChanged,
  required this.provider,
  this.itemBuilder,
  this.customBody,
  this.gridDelegate,
  this.actions = const [],
  this.sortBar,
  this.emptyMessage = 'No items found',
  this.onRefresh,
  this.onFetchNextPage,
  this.floatingActionButton,
  this.padding = const EdgeInsets.all(AppTheme.spacingMedium),
  this.hideAppBar = false,
});