From 3a8cb3f475c813e63a5922762764d4745722b023 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Mon, 19 Feb 2024 18:17:45 +0100 Subject: [PATCH] feat[example]: increase maximum number of items --- example/lib/examples/item_list.dart | 16 ++++++++++++++-- example/lib/examples/long_document.dart | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/example/lib/examples/item_list.dart b/example/lib/examples/item_list.dart index 73bd520..e8971b2 100644 --- a/example/lib/examples/item_list.dart +++ b/example/lib/examples/item_list.dart @@ -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); @@ -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; diff --git a/example/lib/examples/long_document.dart b/example/lib/examples/long_document.dart index 8b87710..69617e5 100644 --- a/example/lib/examples/long_document.dart +++ b/example/lib/examples/long_document.dart @@ -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;