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:
committed by
GitHub
parent
8e0993eda8
commit
5491c8c146
@@ -16,9 +16,7 @@ class IVBuilderExampleApp extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('IV Builder Example'),
|
||||
),
|
||||
appBar: AppBar(title: const Text('IV Builder Example')),
|
||||
body: const _IVBuilderExample(),
|
||||
),
|
||||
);
|
||||
@@ -43,11 +41,7 @@ class _IVBuilderExampleState extends State<_IVBuilderExample> {
|
||||
double xMax = quad.point0.x;
|
||||
double yMin = quad.point0.y;
|
||||
double yMax = quad.point0.y;
|
||||
for (final Vector3 point in <Vector3>[
|
||||
quad.point1,
|
||||
quad.point2,
|
||||
quad.point3,
|
||||
]) {
|
||||
for (final Vector3 point in <Vector3>[quad.point1, quad.point2, quad.point3]) {
|
||||
if (point.x < xMin) {
|
||||
xMin = point.x;
|
||||
} else if (point.x > xMax) {
|
||||
@@ -81,9 +75,7 @@ class _IVBuilderExampleState extends State<_IVBuilderExample> {
|
||||
height: _cellHeight,
|
||||
width: _cellWidth,
|
||||
color: row % 2 + column % 2 == 1 ? Colors.white : Colors.grey.withOpacity(0.1),
|
||||
child: Align(
|
||||
child: Text('$row x $column'),
|
||||
),
|
||||
child: Align(child: Text('$row x $column')),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -36,7 +36,8 @@ class ConstrainedExample extends StatelessWidget {
|
||||
scaleEnabled: false,
|
||||
child: Table(
|
||||
columnWidths: <int, TableColumnWidth>{
|
||||
for (int column = 0; column < columnCount; column += 1) column: const FixedColumnWidth(200.0),
|
||||
for (int column = 0; column < columnCount; column += 1)
|
||||
column: const FixedColumnWidth(200.0),
|
||||
},
|
||||
children: <TableRow>[
|
||||
for (int row = 0; row < rowCount; row += 1)
|
||||
@@ -46,10 +47,7 @@ class ConstrainedExample extends StatelessWidget {
|
||||
Container(
|
||||
height: 26,
|
||||
color: row % 2 + column % 2 == 1 ? Colors.white : Colors.grey.withOpacity(0.1),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text('$row x $column'),
|
||||
),
|
||||
child: Align(alignment: Alignment.centerLeft, child: Text('$row x $column')),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -13,9 +13,7 @@ class TransformationControllerExampleApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
home: TransformationControllerExample(),
|
||||
);
|
||||
return const MaterialApp(home: TransformationControllerExample());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +51,7 @@ class _TransformationControllerExampleState extends State<TransformationControll
|
||||
_controllerReset.forward();
|
||||
}
|
||||
|
||||
// Stop a running reset to home transform animation.
|
||||
// Stop a running reset to home transform animation.
|
||||
void _animateResetStop() {
|
||||
_controllerReset.stop();
|
||||
_animationReset?.removeListener(_onAnimateReset);
|
||||
@@ -89,10 +87,7 @@ class _TransformationControllerExampleState extends State<TransformationControll
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
title: const Text('Controller demo'),
|
||||
),
|
||||
appBar: AppBar(automaticallyImplyLeading: false, title: const Text('Controller demo')),
|
||||
body: Center(
|
||||
child: InteractiveViewer(
|
||||
boundaryMargin: const EdgeInsets.all(double.infinity),
|
||||
|
||||
Reference in New Issue
Block a user