kashi_list 1.1.0
kashi_list: ^1.1.0 copied to clipboard
Searchable, sortable, infinitely scrolling lists for kashi keyset APIs, with a directory controller and a Cupertino KDataList widget with pull-to-refresh and a sort sheet.
kashi_list #
The Flutter side of @softwareseva/list. KDirectoryController owns search (debounced), sort, filters and cursor paging; KDataList renders it with pull-to-refresh, a search field, a sort sheet, infinite scroll, and loading, empty and error states on kashi_ui.
final notes = KDirectoryController<Note>(
fetch: (q) => api.page('/notes', q, Note.fromJson),
sort: 'updatedAt',
direction: KSortDirection.desc,
);
KDataList<Note>(
controller: notes,
sortOptions: const {'updatedAt': 'Last updated', 'title': 'Title'},
itemBuilder: (context, n) => Text(n.title),
onTap: (n) => context.push('/notes/${n.id}'),
);