From 30ede6c1ca2bf7eda81ed7d9f8ec96df64c9903e Mon Sep 17 00:00:00 2001 From: Kate Lovett Date: Wed, 16 Jun 2021 18:25:31 -0500 Subject: [PATCH 1/2] Disable desktop scrollbars --- lib/main.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/main.dart b/lib/main.dart index 50bed89083..1afd7403a8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -47,6 +47,11 @@ class GalleryApp extends StatelessWidget { child: Builder( builder: (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, From 86b76cd3db9ae0a01ae36c80149bfaba0a0f031a Mon Sep 17 00:00:00 2001 From: Kate Lovett Date: Thu, 17 Jun 2021 11:52:12 -0500 Subject: [PATCH 2/2] Fix formatting --- lib/main.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 1afd7403a8..1fcf2b4367 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -51,7 +51,8 @@ class GalleryApp extends StatelessWidget { // 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), + scrollBehavior: + const MaterialScrollBehavior().copyWith(scrollbars: false), restorationScopeId: 'rootGallery', title: 'Flutter Gallery', debugShowCheckedModeBanner: false,