Change the default visual density to be adaptive based on platform. (#66370)

Based on feedback from various desktop developers, and to be consistent between the defaults and the sample code, this PR switches the default for visual density in desktop themes to be compact instead of standard.

It also removes the same setting from the sample code generated by "flutter create" because it is no longer needed now that it is the default.
This commit is contained in:
Greg Spencer
2020-09-23 11:14:58 -07:00
committed by GitHub
parent 9cee75ba61
commit bbd7b97664
5 changed files with 28 additions and 16 deletions

View File

@@ -18,7 +18,6 @@ class MyApp extends StatelessWidget {
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: const Center(child: Text('hello, world'))
);