Skip to content

Commit e3bc8ef

Browse files
authored
Rename Sample classes (flutter#124080)
Rename Sample classes
1 parent c8a3dba commit e3bc8ef

File tree

480 files changed

+3125
-3816
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

480 files changed

+3125
-3816
lines changed

examples/api/lib/animation/curves/curve2_d.0.dart

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,19 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// Flutter code sample for [Curve2D].
6-
75
import 'package:flutter/material.dart';
86

9-
void main() => runApp(const MyApp());
7+
/// Flutter code sample for [Curve2D].
108
11-
class MyApp extends StatelessWidget {
12-
const MyApp({super.key});
9+
void main() => runApp(const Curve2DExampleApp());
1310

14-
static const String _title = 'Flutter Code Sample';
11+
class Curve2DExampleApp extends StatelessWidget {
12+
const Curve2DExampleApp({super.key});
1513

1614
@override
1715
Widget build(BuildContext context) {
1816
return const MaterialApp(
19-
title: _title,
20-
home: MyStatelessWidget(),
17+
home: Curve2DExample(),
2118
);
2219
}
2320
}
@@ -59,8 +56,7 @@ class FollowCurve2D extends StatefulWidget {
5956
State<FollowCurve2D> createState() => _FollowCurve2DState();
6057
}
6158

62-
class _FollowCurve2DState extends State<FollowCurve2D>
63-
with TickerProviderStateMixin {
59+
class _FollowCurve2DState extends State<FollowCurve2D> with TickerProviderStateMixin {
6460
// The animation controller for this animation.
6561
late AnimationController controller;
6662
// The animation that will be used to apply the widget's animation curve.
@@ -87,17 +83,16 @@ class _FollowCurve2DState extends State<FollowCurve2D>
8783
@override
8884
Widget build(BuildContext context) {
8985
// Scale the path values to match the -1.0 to 1.0 domain of the Alignment widget.
90-
final Offset position =
91-
widget.path.transform(animation.value) * 2.0 - const Offset(1.0, 1.0);
86+
final Offset position = widget.path.transform(animation.value) * 2.0 - const Offset(1.0, 1.0);
9287
return Align(
9388
alignment: Alignment(position.dx, position.dy),
9489
child: widget.child,
9590
);
9691
}
9792
}
9893

99-
class MyStatelessWidget extends StatelessWidget {
100-
const MyStatelessWidget({super.key});
94+
class Curve2DExample extends StatelessWidget {
95+
const Curve2DExample({super.key});
10196

10297
@override
10398
Widget build(BuildContext context) {

examples/api/lib/cupertino/activity_indicator/cupertino_activity_indicator.0.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// Flutter code sample for [CupertinoActivityIndicator].
6-
75
import 'package:flutter/cupertino.dart';
86

7+
/// Flutter code sample for [CupertinoActivityIndicator].
8+
99
void main() => runApp(const CupertinoIndicatorApp());
1010

1111
class CupertinoIndicatorApp extends StatelessWidget {
@@ -69,7 +69,7 @@ class CupertinoIndicatorExample extends StatelessWidget {
6969
),
7070
],
7171
),
72-
)
72+
),
7373
);
7474
}
7575
}

examples/api/lib/cupertino/bottom_tab_bar/cupertino_tab_bar.0.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// Flutter code sample for [CupertinoTabBar].
6-
75
import 'package:flutter/cupertino.dart';
86

7+
/// Flutter code sample for [CupertinoTabBar].
8+
99
void main() => runApp(const CupertinoTabBarApp());
1010

1111
class CupertinoTabBarApp extends StatelessWidget {
@@ -30,7 +30,7 @@ class CupertinoTabBarExample extends StatelessWidget {
3030
items: const <BottomNavigationBarItem>[
3131
BottomNavigationBarItem(
3232
icon: Icon(CupertinoIcons.star_fill),
33-
label: 'Favourites',
33+
label: 'Favorites',
3434
),
3535
BottomNavigationBarItem(
3636
icon: Icon(CupertinoIcons.clock_solid),

examples/api/lib/cupertino/button/cupertino_button.0.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// Flutter code sample for [CupertinoButton].
6-
75
import 'package:flutter/cupertino.dart';
86

7+
/// Flutter code sample for [CupertinoButton].
8+
99
void main() => runApp(const CupertinoButtonApp());
1010

1111
class CupertinoButtonApp extends StatelessWidget {

examples/api/lib/cupertino/context_menu/cupertino_context_menu.0.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// Flutter code sample for [CupertinoContextMenu].
6-
75
import 'package:flutter/cupertino.dart';
86
import 'package:flutter/material.dart';
97

8+
/// Flutter code sample for [CupertinoContextMenu].
9+
1010
void main() => runApp(const ContextMenuApp());
1111

1212
class ContextMenuApp extends StatelessWidget {

examples/api/lib/cupertino/context_menu/cupertino_context_menu.1.dart

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// Flutter code sample for [CupertinoContextMenu].
6-
75
import 'package:flutter/cupertino.dart';
86
import 'package:flutter/material.dart';
97

8+
/// Flutter code sample for [CupertinoContextMenu].
9+
1010
final DecorationTween _tween = DecorationTween(
1111
begin: BoxDecoration(
1212
color: CupertinoColors.systemYellow,
@@ -93,15 +93,12 @@ class ContextMenuExample extends StatelessWidget {
9393
child: const Text('Delete'),
9494
),
9595
],
96-
builder:(BuildContext context, Animation<double> animation) {
97-
final Animation<Decoration> boxDecorationAnimation =
98-
_boxDecorationAnimation(animation);
96+
builder: (BuildContext context, Animation<double> animation) {
97+
final Animation<Decoration> boxDecorationAnimation = _boxDecorationAnimation(animation);
9998

10099
return Container(
101100
decoration:
102-
animation.value < CupertinoContextMenu.animationOpensAt
103-
? boxDecorationAnimation.value
104-
: null,
101+
animation.value < CupertinoContextMenu.animationOpensAt ? boxDecorationAnimation.value : null,
105102
child: Container(
106103
decoration: BoxDecoration(
107104
color: CupertinoColors.systemYellow,

examples/api/lib/cupertino/date_picker/cupertino_date_picker.0.dart

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// Flutter code sample for [CupertinoDatePicker].
6-
75
import 'package:flutter/cupertino.dart';
86

7+
/// Flutter code sample for [CupertinoDatePicker].
8+
99
void main() => runApp(const DatePickerApp());
1010

1111
class DatePickerApp extends StatelessWidget {
@@ -52,7 +52,7 @@ class _DatePickerExampleState extends State<DatePickerExample> {
5252
top: false,
5353
child: child,
5454
),
55-
)
55+
),
5656
);
5757
}
5858

@@ -92,7 +92,8 @@ class _DatePickerExampleState extends State<DatePickerExample> {
9292
// In this example, the date is formatted manually. You can
9393
// use the intl package to format the value based on the
9494
// user's locale settings.
95-
child: Text('${date.month}-${date.day}-${date.year}',
95+
child: Text(
96+
'${date.month}-${date.day}-${date.year}',
9697
style: const TextStyle(
9798
fontSize: 22.0,
9899
),
@@ -119,7 +120,8 @@ class _DatePickerExampleState extends State<DatePickerExample> {
119120
// In this example, the time value is formatted manually.
120121
// You can use the intl package to format the value based on
121122
// the user's locale settings.
122-
child: Text('${time.hour}:${time.minute}',
123+
child: Text(
124+
'${time.hour}:${time.minute}',
123125
style: const TextStyle(
124126
fontSize: 22.0,
125127
),
@@ -145,7 +147,8 @@ class _DatePickerExampleState extends State<DatePickerExample> {
145147
// In this example, the time value is formatted manually. You
146148
// can use the intl package to format the value based on the
147149
// user's locale settings.
148-
child: Text('${dateTime.month}-${dateTime.day}-${dateTime.year} ${dateTime.hour}:${dateTime.minute}',
150+
child: Text(
151+
'${dateTime.month}-${dateTime.day}-${dateTime.year} ${dateTime.hour}:${dateTime.minute}',
149152
style: const TextStyle(
150153
fontSize: 22.0,
151154
),

examples/api/lib/cupertino/date_picker/cupertino_timer_picker.0.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// Flutter code sample for [CupertinoTimerPicker].
6-
75
import 'package:flutter/cupertino.dart';
86

7+
/// Flutter code sample for [CupertinoTimerPicker].
8+
99
void main() => runApp(const TimerPickerApp());
1010

1111
class TimerPickerApp extends StatelessWidget {
@@ -50,7 +50,7 @@ class _TimerPickerExampleState extends State<TimerPickerExample> {
5050
top: false,
5151
child: child,
5252
),
53-
)
53+
),
5454
);
5555
}
5656

@@ -88,7 +88,8 @@ class _TimerPickerExampleState extends State<TimerPickerExample> {
8888
// In this example, the timer's value is formatted manually.
8989
// You can use the intl package to format the value based on
9090
// the user's locale settings.
91-
child: Text('$duration',
91+
child: Text(
92+
'$duration',
9293
style: const TextStyle(
9394
fontSize: 22.0,
9495
),

examples/api/lib/cupertino/dialog/cupertino_action_sheet.0.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// Flutter code sample for [CupertinoActionSheet].
6-
75
import 'package:flutter/cupertino.dart';
86

7+
/// Flutter code sample for [CupertinoActionSheet].
8+
99
void main() => runApp(const ActionSheetApp());
1010

1111
class ActionSheetApp extends StatelessWidget {

examples/api/lib/cupertino/dialog/cupertino_alert_dialog.0.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// Flutter code sample for [CupertinoAlertDialog].
6-
75
import 'package:flutter/cupertino.dart';
86

7+
/// Flutter code sample for [CupertinoAlertDialog].
8+
99
void main() => runApp(const AlertDialogApp());
1010

1111
class AlertDialogApp extends StatelessWidget {

0 commit comments

Comments
 (0)