@@ -74,7 +74,7 @@ class _MyAppState extends State<MyApp> {
7474 itemCount: _items.length,
7575 isLoading: _isLoading,
7676 onFetchData: _fetchData,
77- separatorBuilder: (context) => const Divider(),
77+ separatorBuilder: (context, index ) => const Divider(),
7878 itemBuilder: (context, index) {
7979 return ListTile(
8080 dense: true,
@@ -157,19 +157,19 @@ InfiniteList<String>(
157157 // An optional builder that's shown when the list of items is empty.
158158 //
159159 // If `null`, nothing is shown.
160- emptyBuilder: () => const Center(child: Text('No items.')),
160+ emptyBuilder: (context ) => const Center(child: Text('No items.')),
161161
162162 // An optional builder that's shown at the end of the list when [isLoading]
163163 // is `true`.
164164 //
165165 // If `null`, a default builder is used that renders a centered
166166 // [CircularProgressIndicator].
167- loadingBuilder: () => const Center(child: CircularProgressIndicator()),
167+ loadingBuilder: (context ) => const Center(child: CircularProgressIndicator()),
168168
169169 // An optional builder that's shown when [hasError] is not `null`.
170170 //
171171 // If `null`, a default builder is used that renders the text `"Error"`.
172- errorBuilder: () => const Center(child: Text('Error')),
172+ errorBuilder: (context ) => const Center(child: Text('Error')),
173173
174174 // An optional builder that, when provided, is used to show a widget in
175175 // between every pair of items.
@@ -178,7 +178,7 @@ InfiniteList<String>(
178178 // a [Divider] between every tile.
179179 //
180180 // Is optional and can be `null`.
181- separatorBuilder: () => const Divider(),
181+ separatorBuilder: (context, index ) => const Divider(),
182182);
183183```
184184
0 commit comments