-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity #166834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity #166834
Conversation
dkwingsmt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| final BoxConstraints? constraints; | ||
|
|
||
| /// Defines how compact the decoration's layout will be. | ||
| /// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentional that flutter.material.themedata.visualDensity macro is not used here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this was on purpose because I wanted to have a specific documentation and also because in the 'See also' section I added a link to ThemeData.visualDensity. One of the problem when documenting VisualDensity is that its effect are specific to each widget and the flutter.material.themedata.visualDensity documentation macro is very generic.
e2eed2c to
0d20a47
Compare
flutter/flutter@ecabb1a...3ed38e2 2025-04-18 louisehsu@google.com Update `led` docs (flutter/flutter#167380) 2025-04-18 jason-simmons@users.noreply.github.com Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948) 2025-04-18 1063596+reidbaker@users.noreply.github.com Add kotlin compatability to build file validation (flutter/flutter#167143) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400) 2025-04-18 bruno.leroux@gmail.com Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271) 2025-04-18 engine-flutter-autoroll@skia.org Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396) 2025-04-18 bruno.leroux@gmail.com Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388) 2025-04-18 engine-flutter-autoroll@skia.org Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387) 2025-04-18 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347) 2025-04-17 jason-simmons@users.noreply.github.com Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918) 2025-04-17 engine-flutter-autoroll@skia.org Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361) 2025-04-17 30870216+gaaclarke@users.noreply.github.com Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226) 2025-04-17 30870216+gaaclarke@users.noreply.github.com adds Entity docstrings (flutter/flutter#167228) 2025-04-17 30870216+gaaclarke@users.noreply.github.com fixed impeller golden content scale (flutter/flutter#167308) 2025-04-17 30870216+gaaclarke@users.noreply.github.com Added docstring for FilterContents::RenderFilter (flutter/flutter#167227) 2025-04-17 34465683+rkishan516@users.noreply.github.com Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655) 2025-04-17 linxunfeng@yeah.net Fix link to engine docs (flutter/flutter#167346) 2025-04-17 matej.knopp@gmail.com [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536) 2025-04-17 matej.knopp@gmail.com [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726) 2025-04-17 matanlurey@users.noreply.github.com Update `CHANGELOG.md` (flutter/flutter#167225) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter@ecabb1a...3ed38e2 2025-04-18 louisehsu@google.com Update `led` docs (flutter/flutter#167380) 2025-04-18 jason-simmons@users.noreply.github.com Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948) 2025-04-18 1063596+reidbaker@users.noreply.github.com Add kotlin compatability to build file validation (flutter/flutter#167143) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400) 2025-04-18 bruno.leroux@gmail.com Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271) 2025-04-18 engine-flutter-autoroll@skia.org Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396) 2025-04-18 bruno.leroux@gmail.com Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388) 2025-04-18 engine-flutter-autoroll@skia.org Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387) 2025-04-18 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347) 2025-04-17 jason-simmons@users.noreply.github.com Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918) 2025-04-17 engine-flutter-autoroll@skia.org Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361) 2025-04-17 30870216+gaaclarke@users.noreply.github.com Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226) 2025-04-17 30870216+gaaclarke@users.noreply.github.com adds Entity docstrings (flutter/flutter#167228) 2025-04-17 30870216+gaaclarke@users.noreply.github.com fixed impeller golden content scale (flutter/flutter#167308) 2025-04-17 30870216+gaaclarke@users.noreply.github.com Added docstring for FilterContents::RenderFilter (flutter/flutter#167227) 2025-04-17 34465683+rkishan516@users.noreply.github.com Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655) 2025-04-17 linxunfeng@yeah.net Fix link to engine docs (flutter/flutter#167346) 2025-04-17 matej.knopp@gmail.com [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536) 2025-04-17 matej.knopp@gmail.com [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726) 2025-04-17 matanlurey@users.noreply.github.com Update `CHANGELOG.md` (flutter/flutter#167225) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter@ecabb1a...3ed38e2 2025-04-18 louisehsu@google.com Update `led` docs (flutter/flutter#167380) 2025-04-18 jason-simmons@users.noreply.github.com Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948) 2025-04-18 1063596+reidbaker@users.noreply.github.com Add kotlin compatability to build file validation (flutter/flutter#167143) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400) 2025-04-18 bruno.leroux@gmail.com Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271) 2025-04-18 engine-flutter-autoroll@skia.org Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396) 2025-04-18 bruno.leroux@gmail.com Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388) 2025-04-18 engine-flutter-autoroll@skia.org Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387) 2025-04-18 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347) 2025-04-17 jason-simmons@users.noreply.github.com Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918) 2025-04-17 engine-flutter-autoroll@skia.org Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361) 2025-04-17 30870216+gaaclarke@users.noreply.github.com Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226) 2025-04-17 30870216+gaaclarke@users.noreply.github.com adds Entity docstrings (flutter/flutter#167228) 2025-04-17 30870216+gaaclarke@users.noreply.github.com fixed impeller golden content scale (flutter/flutter#167308) 2025-04-17 30870216+gaaclarke@users.noreply.github.com Added docstring for FilterContents::RenderFilter (flutter/flutter#167227) 2025-04-17 34465683+rkishan516@users.noreply.github.com Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655) 2025-04-17 linxunfeng@yeah.net Fix link to engine docs (flutter/flutter#167346) 2025-04-17 matej.knopp@gmail.com [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536) 2025-04-17 matej.knopp@gmail.com [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726) 2025-04-17 matanlurey@users.noreply.github.com Update `CHANGELOG.md` (flutter/flutter#167225) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter@ecabb1a...3ed38e2 2025-04-18 louisehsu@google.com Update `led` docs (flutter/flutter#167380) 2025-04-18 jason-simmons@users.noreply.github.com Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948) 2025-04-18 1063596+reidbaker@users.noreply.github.com Add kotlin compatability to build file validation (flutter/flutter#167143) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400) 2025-04-18 bruno.leroux@gmail.com Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271) 2025-04-18 engine-flutter-autoroll@skia.org Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396) 2025-04-18 bruno.leroux@gmail.com Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388) 2025-04-18 engine-flutter-autoroll@skia.org Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387) 2025-04-18 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347) 2025-04-17 jason-simmons@users.noreply.github.com Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918) 2025-04-17 engine-flutter-autoroll@skia.org Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361) 2025-04-17 30870216+gaaclarke@users.noreply.github.com Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226) 2025-04-17 30870216+gaaclarke@users.noreply.github.com adds Entity docstrings (flutter/flutter#167228) 2025-04-17 30870216+gaaclarke@users.noreply.github.com fixed impeller golden content scale (flutter/flutter#167308) 2025-04-17 30870216+gaaclarke@users.noreply.github.com Added docstring for FilterContents::RenderFilter (flutter/flutter#167227) 2025-04-17 34465683+rkishan516@users.noreply.github.com Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655) 2025-04-17 linxunfeng@yeah.net Fix link to engine docs (flutter/flutter#167346) 2025-04-17 matej.knopp@gmail.com [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536) 2025-04-17 matej.knopp@gmail.com [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726) 2025-04-17 matanlurey@users.noreply.github.com Update `CHANGELOG.md` (flutter/flutter#167225) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter@ecabb1a...3ed38e2 2025-04-18 louisehsu@google.com Update `led` docs (flutter/flutter#167380) 2025-04-18 jason-simmons@users.noreply.github.com Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948) 2025-04-18 1063596+reidbaker@users.noreply.github.com Add kotlin compatability to build file validation (flutter/flutter#167143) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400) 2025-04-18 bruno.leroux@gmail.com Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271) 2025-04-18 engine-flutter-autoroll@skia.org Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396) 2025-04-18 bruno.leroux@gmail.com Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389) 2025-04-18 engine-flutter-autoroll@skia.org Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388) 2025-04-18 engine-flutter-autoroll@skia.org Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387) 2025-04-18 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347) 2025-04-17 jason-simmons@users.noreply.github.com Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918) 2025-04-17 engine-flutter-autoroll@skia.org Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361) 2025-04-17 30870216+gaaclarke@users.noreply.github.com Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226) 2025-04-17 30870216+gaaclarke@users.noreply.github.com adds Entity docstrings (flutter/flutter#167228) 2025-04-17 30870216+gaaclarke@users.noreply.github.com fixed impeller golden content scale (flutter/flutter#167308) 2025-04-17 30870216+gaaclarke@users.noreply.github.com Added docstring for FilterContents::RenderFilter (flutter/flutter#167227) 2025-04-17 34465683+rkishan516@users.noreply.github.com Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655) 2025-04-17 linxunfeng@yeah.net Fix link to engine docs (flutter/flutter#167346) 2025-04-17 matej.knopp@gmail.com [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536) 2025-04-17 matej.knopp@gmail.com [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726) 2025-04-17 matanlurey@users.noreply.github.com Update `CHANGELOG.md` (flutter/flutter#167225) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ity (flutter#166834) ## Description This PR introduces `InputDecoration.visualDensity` and `InputDecorationTheme.visualDensity`. See flutter#166201 (comment) for motivation. ## Related Issue Fixes flutter#166201 ## Tests Adds 8 tests (4 for filled decoration, 4 for outlined decoration).
Description
This PR introduces
InputDecoration.visualDensityandInputDecorationTheme.visualDensity.See #166201 (comment) for motivation.
Related Issue
Fixes #166201
Tests
Adds 8 tests (4 for filled decoration, 4 for outlined decoration).