Skip to content

Commit

Permalink
feat[example]: increase maximum number of items
Browse files Browse the repository at this point in the history
  • Loading branch information
knopp committed Feb 19, 2024
1 parent eeddef1 commit 3a8cb3f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions example/lib/examples/item_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@ import "../widgets/sliver_decoration.dart";
import "../widgets/sliver_list_disclaimer.dart";

const _kMaxSlivers = 10;
const _kItemsPerSliver = [1, 9, 27, 80, 200, 1000, 2500, 7000, 20000];
const _kItemsPerSliver = [
1,
5,
9,
27,
80,
200,
1000,
2500,
7000,
20000,
100000
];

class _ReadingOrderTraversalPolicy extends ReadingOrderTraversalPolicy {
_ReadingOrderTraversalPolicy() : super(requestFocusCallback: _requestFocus);
Expand Down Expand Up @@ -403,7 +415,7 @@ class _SidebarWidget extends StatelessWidget {
children: [
NumberPicker(
title: const Text("Slivers"),
options: List.generate(_kMaxSlivers - 1, (index) => index + 1),
options: List.generate(_kMaxSlivers, (index) => index + 1),
value: sliverCount,
onChanged: (value) {
settings.sliverCount.value = value;
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/long_document.dart
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class _SidebarWidget extends StatelessWidget {
children: [
NumberPicker(
title: const Text("Slivers"),
options: List.generate(_kMaxSlivers - 1, (index) => index + 1),
options: List.generate(_kMaxSlivers, (index) => index + 1),
value: sliverCount,
onChanged: (value) {
this.sliverCount.value = value;
Expand Down

0 comments on commit 3a8cb3f

Please sign in to comment.