I tried alphabet_scroll_view and azlistview, but it doesnt work with customscrollview and sliverlists.
I have:
customscrollview
Appbar - pinned
title
sliverlist (10 items)
title
sliverlist (10 items)
tabs (contacts, favorites) - pinned
contactswidget
sliverlist (+ a-z list view)
I need exact functionality that azlistview has, but in sliver version.
tried everything i could think of, but sliverstack just doesnt fix the side menu, scrolljump is wrong, scrollable.ensurevisible jumps to the bottom and sort of these problems.
EDIT: my structure is:
Customscrollview
- appbar
- search
- widget
- widget
- tabs
- widget
- sliverlist (with missing AZ menu)
class TestModel {
String tagIndex;
String name;
TestModel({required this.tagIndex, required this.name});
}
class IndexPartial extends ConsumerWidget {
final bool definitionsOnly;
const IndexPartial({super.key, this.favorites = false});
@override
Widget build(BuildContext context, WidgetRef ref) {
final state = ref.watch(indexProvider(favorites));
final List<TestModel> contacts = [
TestModel(name: 'eeee', tagIndex: 'E'),
TestModel(name: 'eeeeee', tagIndex: 'E'),
TestModel(name: 'pp', tagIndex: 'P'),
TestModel(name: 'ppp', tagIndex: 'P'),
TestModel(name: 'pppp', tagIndex: 'P'),
TestModel(name: 'ppppp', tagIndex: 'P'),
TestModel(name: 'w', tagIndex: 'W'),
];
return state.when(
data: (data) {
return MultiSliver(
children: [
//AZ list index
SliverPadding(
padding: const EdgeInsets.only(right: 45),
sliver: SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
return Container(
height: 200,
color: Colors.yellow,
child: Text(contacts[index].name),
);
},
childCount: contacts.length,
),
),
),
],
);
},
error: (error, stackTrace) {
...
},
loading: () {
...
},
);
}
EDIT:
i tried alphabet_list_view
Since its listview i get: LateInitializationError: Field 'geometry' has not been initialized.
i have customscrollview and another customscrollview from alphabet_list_view nested is not the way, shrinkwrap is out of question.