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> ({
- required bool selection,
- required bool multipleSelection,
- required C consumer,
- required B builder,
- bool invertSelection = false,
- bool forceOffline = false,
- Future<
Widget?> onAdd(- BuildContext context,
- B builder,
- C consumer
- Future<
Widget?> onUpdate(- BuildContext context,
- T model,
- B builder,
- C consumer, {
- required bool edit,
- Map<
String, String> qsParam = const <String, String>{}, - int itemsPerPage = 50,
- int qtdSuggestions = 15,
- Future<
Widget?> onLongPress(- BuildContext context,
- T model,
- B builder,
- C consumer, {
- required bool edit,
- String? searchFieldLabel,
- TextStyle? searchFieldStyle,
- InputDecorationTheme? searchFieldDecorationTheme,
- TextInputType? searchKeyboardType,
- TextInputAction searchTextInputAction = TextInputAction.search,
- IconData selectedIcon = FontAwesomeIcons.solidCircleCheck,
- IconData unselectedIcon = FontAwesomeIcons.circle,
- int minLengthToSearch = 3,
- String hintText = 'Sugestões:',
- String selectionText = 'Selecionar %s',
- String startSearchText = 'Começe a sua pesquisa.\n' 'Digite ao menos %s caracteres.',
- String deleteText = 'Deseja excluir?',
- String invertSelectionText = 'Inverter seleção',
- String waitingText = 'Consultando...',
- String deleteErrorText = 'Ocorreu um erro ao tentar excluir:\n%s',
- String searchListEmpty = 'Nenhum documento.',
- String addText = 'Adicionar %s',
- bool showSearchButton = true,
- String searchButtonText = 'Pesquisar %s',
- String listEmpty = 'Sem %s até o momento.',
- bool showRefreshButton = false,
- String refreshButtonText = 'Atualizar',
- Widget? appBarLeading(
- BuildContext context
- List<
Widget> actions(- BuildContext context,
- B builder,
- C consumer,
- Map<
String, String> qsParam, { - required bool selection,
- List<
Widget> rowActions(})?, - double? leadingWidth,
- 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.',
);