Auto-format Framework (#160545)

This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.

**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
This commit is contained in:
Michael Goderbauer
2024-12-19 12:06:21 -08:00
committed by GitHub
parent 8e0993eda8
commit 5491c8c146
4411 changed files with 455108 additions and 415991 deletions

View File

@@ -40,9 +40,7 @@ class _ExpansionTileExampleState extends State<ExpansionTileExample> {
const ExpansionTile(
title: Text('ExpansionTile 1'),
subtitle: Text('Trailing expansion arrow icon'),
children: <Widget>[
ListTile(title: Text('This is tile number 1')),
],
children: <Widget>[ListTile(title: Text('This is tile number 1'))],
),
ExpansionTile(
title: const Text('ExpansionTile 2'),
@@ -50,9 +48,7 @@ class _ExpansionTileExampleState extends State<ExpansionTileExample> {
trailing: Icon(
_customTileExpanded ? Icons.arrow_drop_down_circle : Icons.arrow_drop_down,
),
children: const <Widget>[
ListTile(title: Text('This is tile number 2')),
],
children: const <Widget>[ListTile(title: Text('This is tile number 2'))],
onExpansionChanged: (bool expanded) {
setState(() {
_customTileExpanded = expanded;
@@ -63,9 +59,7 @@ class _ExpansionTileExampleState extends State<ExpansionTileExample> {
title: Text('ExpansionTile 3'),
subtitle: Text('Leading expansion arrow icon'),
controlAffinity: ListTileControlAffinity.leading,
children: <Widget>[
ListTile(title: Text('This is tile number 3')),
],
children: <Widget>[ListTile(title: Text('This is tile number 3'))],
),
],
);

View File

@@ -11,6 +11,7 @@ void main() {
}
enum AnimationStyles { defaultStyle, custom, none }
const List<(AnimationStyles, String)> animationStyleSegments = <(AnimationStyles, String)>[
(AnimationStyles.defaultStyle, 'Default'),
(AnimationStyles.custom, 'Custom'),
@@ -54,11 +55,12 @@ class _ExpansionTileAnimationStyleAppState extends State<ExpansionTileAnimationS
}
});
},
segments: animationStyleSegments
.map<ButtonSegment<AnimationStyles>>(((AnimationStyles, String) shirt) {
return ButtonSegment<AnimationStyles>(value: shirt.$1, label: Text(shirt.$2));
})
.toList(),
segments:
animationStyleSegments.map<ButtonSegment<AnimationStyles>>((
(AnimationStyles, String) shirt,
) {
return ButtonSegment<AnimationStyles>(value: shirt.$1, label: Text(shirt.$2));
}).toList(),
),
const SizedBox(height: 20),
ExpansionTile(
@@ -68,7 +70,7 @@ class _ExpansionTileAnimationStyleAppState extends State<ExpansionTileAnimationS
ListTile(title: Text('Expanded Item 1')),
ListTile(title: Text('Expanded Item 2')),
],
)
),
],
),
),