return AlphabetListScrollView(
strList: _names!,
highlightTextStyle: const TextStyle(
color: Colors.yellow,
),
showPreview: true,
itemBuilder: (context, index) {
return ListTile(title: Text(_names![index]));
},
indexedHeight: (i) {
return 80;
},
keyboardUsage: true,
headerWidgetList: [
AlphabetScrollListHeader(widgetList: [
Padding(
padding: const EdgeInsets.all(16.0),
child: TextFormField(
decoration: const InputDecoration(
border: OutlineInputBorder(),
suffix: Icon(
Icons.search,
color: Colors.grey,
),
labelText: "Search",
),
),
)
], icon: const Icon(Icons.search), indexedHeaderHeight: (index) => 80),
],
);
}
its showing error like "RangeError (index): Invalid value: Valid value range is empty: 0"