Skip to content

Commit 89f755c

Browse files
authored
Replace references to LinearProgressIndicator in CircularProgressIndicator example (#103349)
* Replace references to LinearProgressIndicator in CircularProgressIndicator example * Add test * fix copyright header
1 parent 106ab98 commit 89f755c

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

examples/api/lib/material/progress_indicator/circular_progress_indicator.0.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
6161
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
6262
children: <Widget>[
6363
Text(
64-
'Linear progress indicator with a fixed color',
64+
'Circular progress indicator with a fixed color',
6565
style: Theme.of(context).textTheme.headline6,
6666
),
6767
CircularProgressIndicator(
6868
value: controller.value,
69-
semanticsLabel: 'Linear progress indicator',
69+
semanticsLabel: 'Circular progress indicator',
7070
),
7171
],
7272
),
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2014 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'package:flutter_api_samples/material/progress_indicator/circular_progress_indicator.0.dart'
6+
as example;
7+
import 'package:flutter_test/flutter_test.dart';
8+
9+
void main() {
10+
testWidgets('Finds CircularProgressIndicator', (WidgetTester tester) async {
11+
await tester.pumpWidget(
12+
const example.MyApp(),
13+
);
14+
expect(
15+
find.bySemanticsLabel('Circular progress indicator'),
16+
findsOneWidget,
17+
);
18+
});
19+
}

0 commit comments

Comments
 (0)