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

@@ -19,9 +19,7 @@ class LabeledSwitchApp extends StatelessWidget {
theme: ThemeData(useMaterial3: true),
home: Scaffold(
appBar: AppBar(title: const Text('Custom Labeled Switch Sample')),
body: const Center(
child: LabeledSwitchExample(),
),
body: const Center(child: LabeledSwitchExample()),
),
);
}
@@ -55,10 +53,11 @@ class LinkedLabelSwitch extends StatelessWidget {
color: Theme.of(context).colorScheme.primary,
decoration: TextDecoration.underline,
),
recognizer: TapGestureRecognizer()
..onTap = () {
debugPrint('Label has been tapped.');
},
recognizer:
TapGestureRecognizer()
..onTap = () {
debugPrint('Label has been tapped.');
},
),
),
),

View File

@@ -17,9 +17,7 @@ class LabeledSwitchApp extends StatelessWidget {
theme: ThemeData(useMaterial3: true),
home: Scaffold(
appBar: AppBar(title: const Text('Custom Labeled Switch Sample')),
body: const Center(
child: LabeledSwitchExample(),
),
body: const Center(child: LabeledSwitchExample()),
),
);
}

View File

@@ -17,9 +17,7 @@ class SwitchListTileApp extends StatelessWidget {
theme: ThemeData(useMaterial3: true),
home: Scaffold(
appBar: AppBar(title: const Text('SwitchListTile Sample')),
body: const Center(
child: SwitchListTileExample(),
),
body: const Center(child: SwitchListTileExample()),
),
);
}

View File

@@ -15,7 +15,10 @@ class SwitchListTileApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(useMaterial3: true),
home: Scaffold(appBar: AppBar(title: const Text('SwitchListTile Sample')), body: const SwitchListTileExample()),
home: Scaffold(
appBar: AppBar(title: const Text('SwitchListTile Sample')),
body: const SwitchListTileExample(),
),
);
}
}
@@ -57,7 +60,8 @@ class _SwitchListTileExampleState extends State<SwitchListTileExample> {
},
title: const Text('Headline'),
subtitle: const Text(
'Longer supporting text to demonstrate how the text wraps and the switch is centered vertically with the text.'),
'Longer supporting text to demonstrate how the text wraps and the switch is centered vertically with the text.',
),
),
const Divider(height: 0),
SwitchListTile(
@@ -69,7 +73,8 @@ class _SwitchListTileExampleState extends State<SwitchListTileExample> {
},
title: const Text('Headline'),
subtitle: const Text(
"Longer supporting text to demonstrate how the text wraps and how setting 'SwitchListTile.isThreeLine = true' aligns the switch to the top vertically with the text."),
"Longer supporting text to demonstrate how the text wraps and how setting 'SwitchListTile.isThreeLine = true' aligns the switch to the top vertically with the text.",
),
isThreeLine: true,
),
const Divider(height: 0),