AbstractList<T extends AbstractModel<ID>, B extends AbstractBuilder<T, ID>, C extends AbstractConsumer<T, ID>, ID> constructor

const AbstractList<T extends AbstractModel<ID>, B extends AbstractBuilder<T, ID>, C extends AbstractConsumer<T, ID>, ID>({
  1. required bool selection,
  2. required bool multipleSelection,
  3. required C consumer,
  4. required B builder,
  5. bool invertSelection = false,
  6. bool forceOffline = false,
  7. Future<Widget?> onAdd(
    1. BuildContext context,
    2. B builder,
    3. C consumer
    )?,
  8. Future<Widget?> onUpdate(
    1. BuildContext context,
    2. T model,
    3. B builder,
    4. C consumer, {
    5. required bool edit,
    })?,
  9. Map<String, String> qsParam = const <String, String>{},
  10. int itemsPerPage = 50,
  11. int qtdSuggestions = 15,
  12. Future<Widget?> onLongPress(
    1. BuildContext context,
    2. T model,
    3. B builder,
    4. C consumer, {
    5. required bool edit,
    })?,
  13. String? searchFieldLabel,
  14. TextStyle? searchFieldStyle,
  15. InputDecorationTheme? searchFieldDecorationTheme,
  16. TextInputType? searchKeyboardType,
  17. TextInputAction searchTextInputAction = TextInputAction.search,
  18. IconData selectedIcon = FontAwesomeIcons.solidCircleCheck,
  19. IconData unselectedIcon = FontAwesomeIcons.circle,
  20. int minLengthToSearch = 3,
  21. String hintText = 'Sugestões:',
  22. String selectionText = 'Selecionar %s',
  23. String startSearchText = 'Começe a sua pesquisa.\n' 'Digite ao menos %s caracteres.',
  24. String deleteText = 'Deseja excluir?',
  25. String invertSelectionText = 'Inverter seleção',
  26. String waitingText = 'Consultando...',
  27. String deleteErrorText = 'Ocorreu um erro ao tentar excluir:\n%s',
  28. String searchListEmpty = 'Nenhum documento.',
  29. String addText = 'Adicionar %s',
  30. bool showSearchButton = true,
  31. String searchButtonText = 'Pesquisar %s',
  32. String listEmpty = 'Sem %s até o momento.',
  33. bool showRefreshButton = false,
  34. String refreshButtonText = 'Atualizar',
  35. Widget? appBarLeading(
    1. BuildContext context
    )?,
  36. List<Widget> actions(
    1. BuildContext context,
    2. B builder,
    3. C consumer,
    4. Map<String, String> qsParam, {
    5. required bool selection,
    })?,
  37. List<Widget> rowActions(
    1. BuildContext context,
    2. T model,
    3. B builder,
    4. C consumer,
    5. Map<String, String> qsParam,
    6. void refresh({
      1. bool clear,
      })?, {
    7. required bool selection,
    })?,
  38. double? leadingWidth,
  39. Key? key,
})

Implementation

const AbstractList({
  required this.selection,
  required this.multipleSelection,
  required this.consumer,
  required this.builder,
  this.invertSelection = false,
  this.forceOffline = false,
  this.onAdd,
  this.onUpdate,
  this.qsParam = const <String, String>{},
  this.itemsPerPage = 50,
  this.qtdSuggestions = 15,
  this.onLongPress,
  this.searchFieldLabel,
  this.searchFieldStyle,
  this.searchFieldDecorationTheme,
  this.searchKeyboardType,
  this.searchTextInputAction = TextInputAction.search,
  this.selectedIcon = FontAwesomeIcons.solidCircleCheck,
  this.unselectedIcon = FontAwesomeIcons.circle,
  this.minLengthToSearch = 3,
  this.hintText = 'Sugestões:',
  this.selectionText = 'Selecionar %s',
  this.startSearchText = 'Começe a sua pesquisa.\n'
      'Digite ao menos %s caracteres.',
  this.deleteText = 'Deseja excluir?',
  this.invertSelectionText = 'Inverter seleção',
  this.waitingText = 'Consultando...',
  this.deleteErrorText = 'Ocorreu um erro ao tentar excluir:\n%s',
  this.searchListEmpty = 'Nenhum documento.',
  this.addText = 'Adicionar %s',
  this.showSearchButton = true,
  this.searchButtonText = 'Pesquisar %s',
  this.listEmpty = 'Sem %s até o momento.',
  this.showRefreshButton = false,
  this.refreshButtonText = 'Atualizar',
  this.appBarLeading,
  this.actions,
  this.rowActions,
  this.leadingWidth,
  super.key,
}) : assert(
        searchFieldStyle == null || searchFieldDecorationTheme == null,
        'searchFieldStyle or searchFieldDecorationTheme must be null.',
      );