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
@@ -8,10 +8,10 @@ import 'package:flutter_api_samples/material/progress_indicator/circular_progres
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Determinate CircularProgressIndicator uses the provided value', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const example.ProgressIndicatorExampleApp(),
|
||||
);
|
||||
testWidgets('Determinate CircularProgressIndicator uses the provided value', (
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
await tester.pumpWidget(const example.ProgressIndicatorExampleApp());
|
||||
await tester.pump(const Duration(milliseconds: 2500));
|
||||
|
||||
final Finder indicatorFinder = find.byType(CircularProgressIndicator).first;
|
||||
@@ -19,10 +19,10 @@ void main() {
|
||||
expect(progressIndicator.value, equals(0.5));
|
||||
});
|
||||
|
||||
testWidgets('Indeterminate CircularProgressIndicator does not have a value', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const example.ProgressIndicatorExampleApp(),
|
||||
);
|
||||
testWidgets('Indeterminate CircularProgressIndicator does not have a value', (
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
await tester.pumpWidget(const example.ProgressIndicatorExampleApp());
|
||||
await tester.pump(const Duration(milliseconds: 2500));
|
||||
|
||||
final Finder indicatorFinder = find.byType(CircularProgressIndicator).last;
|
||||
@@ -31,9 +31,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('Progress indicators year2023 flag can be toggled', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const example.ProgressIndicatorExampleApp(),
|
||||
);
|
||||
await tester.pumpWidget(const example.ProgressIndicatorExampleApp());
|
||||
|
||||
CircularProgressIndicator determinateIndicator = tester.widget<CircularProgressIndicator>(
|
||||
find.byType(CircularProgressIndicator).first,
|
||||
|
||||
@@ -9,14 +9,9 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Finds CircularProgressIndicator', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const example.ProgressIndicatorExampleApp(),
|
||||
);
|
||||
await tester.pumpWidget(const example.ProgressIndicatorExampleApp());
|
||||
|
||||
expect(
|
||||
find.bySemanticsLabel('Circular progress indicator').first,
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.bySemanticsLabel('Circular progress indicator').first, findsOneWidget);
|
||||
|
||||
// Test if CircularProgressIndicator is animating.
|
||||
expect(tester.hasRunningAnimations, isTrue);
|
||||
|
||||
@@ -8,10 +8,10 @@ import 'package:flutter_api_samples/material/progress_indicator/linear_progress_
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Determinate LinearProgressIndicator uses the provided value', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const example.ProgressIndicatorExampleApp(),
|
||||
);
|
||||
testWidgets('Determinate LinearProgressIndicator uses the provided value', (
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
await tester.pumpWidget(const example.ProgressIndicatorExampleApp());
|
||||
await tester.pump(const Duration(milliseconds: 2500));
|
||||
|
||||
final Finder indicatorFinder = find.byType(LinearProgressIndicator).first;
|
||||
@@ -19,10 +19,10 @@ void main() {
|
||||
expect(progressIndicator.value, equals(0.5));
|
||||
});
|
||||
|
||||
testWidgets('Indeterminate LinearProgressIndicator does not have a value', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const example.ProgressIndicatorExampleApp(),
|
||||
);
|
||||
testWidgets('Indeterminate LinearProgressIndicator does not have a value', (
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
await tester.pumpWidget(const example.ProgressIndicatorExampleApp());
|
||||
await tester.pump(const Duration(milliseconds: 2500));
|
||||
|
||||
final Finder indicatorFinder = find.byType(LinearProgressIndicator).last;
|
||||
@@ -31,9 +31,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('Progress indicators year2023 flag can be toggled', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const example.ProgressIndicatorExampleApp(),
|
||||
);
|
||||
await tester.pumpWidget(const example.ProgressIndicatorExampleApp());
|
||||
|
||||
LinearProgressIndicator determinateIndicator = tester.widget<LinearProgressIndicator>(
|
||||
find.byType(LinearProgressIndicator).first,
|
||||
|
||||
@@ -8,16 +8,10 @@ import 'package:flutter_api_samples/material/progress_indicator/linear_progress_
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Can control LinearProgressIndicator value',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const example.ProgressIndicatorExampleApp(),
|
||||
);
|
||||
testWidgets('Can control LinearProgressIndicator value', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(const example.ProgressIndicatorExampleApp());
|
||||
|
||||
expect(
|
||||
find.bySemanticsLabel('Linear progress indicator').first,
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.bySemanticsLabel('Linear progress indicator').first, findsOneWidget);
|
||||
|
||||
// Test if LinearProgressIndicator is animating.
|
||||
expect(tester.hasRunningAnimations, isTrue);
|
||||
|
||||
Reference in New Issue
Block a user