Enable scrollbars (#735)
* fix typo
* x
* x
diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb
index 013aa24..fec97b9 100644
--- a/lib/l10n/intl_en.arb
+++ b/lib/l10n/intl_en.arb
@@ -1431,7 +1431,7 @@
"@demoCupertinoScrollbarTitle": {
"description": "Title for the cupertino scrollbar demo."
},
- "demoCupertinoScrollbarSubtitle": "iOS style scrollbar",
+ "demoCupertinoScrollbarSubtitle": "iOS-style scrollbar",
"@demoCupertinoScrollbarSubtitle": {
"description": "Subtitle for the cupertino scrollbar demo."
},
diff --git a/lib/l10n/intl_en_US.xml b/lib/l10n/intl_en_US.xml
index 84a8bdb..cfa8ca0 100644
--- a/lib/l10n/intl_en_US.xml
+++ b/lib/l10n/intl_en_US.xml
@@ -1324,7 +1324,7 @@
<string
name="demoCupertinoScrollbarSubtitle"
description="Subtitle for the cupertino scrollbar demo."
- >iOS style scrollbar</string>
+ >iOS-style scrollbar</string>
<string
name="demoCupertinoScrollbarDescription"
description="Description for the cupertino scrollbar demo."
diff --git a/lib/main.dart b/lib/main.dart
index 10499e7..8d034b2 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -48,12 +48,6 @@
builder: (context) {
final options = GalleryOptions.of(context);
return MaterialApp(
- // By default on desktop, scrollbars are applied by the
- // ScrollBehavior. This overrides that. All vertical scrollables in
- // the gallery need to be audited before enabling this feature,
- // see https://github.com/flutter/gallery/issues/523
- scrollBehavior:
- const MaterialScrollBehavior().copyWith(scrollbars: false),
restorationScopeId: 'rootGallery',
title: 'Flutter Gallery',
debugShowCheckedModeBanner: false,
diff --git a/lib/pages/home.dart b/lib/pages/home.dart
index c02f9a6..5c260d5 100644
--- a/lib/pages/home.dart
+++ b/lib/pages/home.dart
@@ -532,6 +532,7 @@
child: ListView.builder(
// Makes integration tests possible.
key: ValueKey('${category.name}DemoList'),
+ primary: false,
itemBuilder: (context, index) =>
CategoryDemoItem(demo: demos[index]),
itemCount: demos.length,
@@ -907,6 +908,7 @@
),
child: ListView.builder(
scrollDirection: Axis.horizontal,
+ primary: false,
physics: const _SnappingScrollPhysics(),
controller: _controller,
itemExtent: itemWidth,