Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
Enable scrollbars (#735)
Browse files Browse the repository at this point in the history
* fix typo

* x

* x
  • Loading branch information
guidezpl authored Jul 13, 2022
1 parent 9212aec commit 89c9492
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
},
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/intl_en_US.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
6 changes: 0 additions & 6 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ class GalleryApp extends StatelessWidget {
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,
Expand Down
2 changes: 2 additions & 0 deletions lib/pages/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ class _DesktopCategoryItem extends StatelessWidget {
child: ListView.builder(
// Makes integration tests possible.
key: ValueKey('${category.name}DemoList'),
primary: false,
itemBuilder: (context, index) =>
CategoryDemoItem(demo: demos[index]),
itemCount: demos.length,
Expand Down Expand Up @@ -907,6 +908,7 @@ class _DesktopCarouselState extends State<_DesktopCarousel> {
),
child: ListView.builder(
scrollDirection: Axis.horizontal,
primary: false,
physics: const _SnappingScrollPhysics(),
controller: _controller,
itemExtent: itemWidth,
Expand Down

0 comments on commit 89c9492

Please sign in to comment.