Skip to content

Commit 0042096

Browse files
committed
- Removed leading underscores for local identifiers
1 parent d0658bc commit 0042096

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

lib/src/cupertino/cupertino_controls.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ class _CupertinoControlsState extends State<CupertinoControls>
142142

143143
@override
144144
void didChangeDependencies() {
145-
final _oldController = _chewieController;
145+
final oldController = _chewieController;
146146
_chewieController = ChewieController.of(context);
147147
controller = chewieController.videoPlayerController;
148148

149-
if (_oldController != chewieController) {
149+
if (oldController != chewieController) {
150150
_dispose();
151151
_initialize();
152152
}

lib/src/material/material_controls.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ class _MaterialControlsState extends State<MaterialControls>
128128

129129
@override
130130
void didChangeDependencies() {
131-
final _oldController = _chewieController;
131+
final oldController = _chewieController;
132132
_chewieController = ChewieController.of(context);
133133
controller = chewieController.videoPlayerController;
134134

135-
if (_oldController != chewieController) {
135+
if (oldController != chewieController) {
136136
_dispose();
137137
_initialize();
138138
}

lib/src/material/material_desktop_controls.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ class _MaterialDesktopControlsState extends State<MaterialDesktopControls>
128128

129129
@override
130130
void didChangeDependencies() {
131-
final _oldController = _chewieController;
131+
final oldController = _chewieController;
132132
_chewieController = ChewieController.of(context);
133133
controller = chewieController.videoPlayerController;
134134

135-
if (_oldController != chewieController) {
135+
if (oldController != chewieController) {
136136
_dispose();
137137
_initialize();
138138
}

lib/src/material/widgets/playback_speed_dialog.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class PlaybackSpeedDialog extends StatelessWidget {
2020
shrinkWrap: true,
2121
physics: const ScrollPhysics(),
2222
itemBuilder: (context, index) {
23-
final _speed = _speeds[index];
23+
final speed = _speeds[index];
2424
return ListTile(
2525
dense: true,
2626
title: Row(
2727
children: [
28-
if (_speed == _selected)
28+
if (speed == _selected)
2929
Icon(
3030
Icons.check,
3131
size: 20.0,
@@ -34,12 +34,12 @@ class PlaybackSpeedDialog extends StatelessWidget {
3434
else
3535
Container(width: 20.0),
3636
const SizedBox(width: 16.0),
37-
Text(_speed.toString()),
37+
Text(speed.toString()),
3838
],
3939
),
40-
selected: _speed == _selected,
40+
selected: speed == _selected,
4141
onTap: () {
42-
Navigator.of(context).pop(_speed);
42+
Navigator.of(context).pop(speed);
4343
},
4444
);
4545
},

lib/src/player_with_controls.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ class PlayerWithControls extends StatelessWidget {
1212
Widget build(BuildContext context) {
1313
final ChewieController chewieController = ChewieController.of(context);
1414

15-
double _calculateAspectRatio(BuildContext context) {
15+
double calculateAspectRatio(BuildContext context) {
1616
final size = MediaQuery.of(context).size;
1717
final width = size.width;
1818
final height = size.height;
1919

2020
return width > height ? width / height : height / width;
2121
}
2222

23-
Widget _buildControls(
23+
Widget buildControls(
2424
BuildContext context,
2525
ChewieController chewieController,
2626
) {
@@ -29,7 +29,7 @@ class PlayerWithControls extends StatelessWidget {
2929
: const SizedBox();
3030
}
3131

32-
Widget _buildPlayerWithControls(
32+
Widget buildPlayerWithControls(
3333
ChewieController chewieController,
3434
BuildContext context,
3535
) {
@@ -73,11 +73,11 @@ class PlayerWithControls extends StatelessWidget {
7373
),
7474
),
7575
if (!chewieController.isFullScreen)
76-
_buildControls(context, chewieController)
76+
buildControls(context, chewieController)
7777
else
7878
SafeArea(
7979
bottom: false,
80-
child: _buildControls(context, chewieController),
80+
child: buildControls(context, chewieController),
8181
),
8282
],
8383
);
@@ -88,8 +88,8 @@ class PlayerWithControls extends StatelessWidget {
8888
height: MediaQuery.of(context).size.height,
8989
width: MediaQuery.of(context).size.width,
9090
child: AspectRatio(
91-
aspectRatio: _calculateAspectRatio(context),
92-
child: _buildPlayerWithControls(chewieController, context),
91+
aspectRatio: calculateAspectRatio(context),
92+
child: buildPlayerWithControls(chewieController, context),
9393
),
9494
),
9595
);

0 commit comments

Comments
 (0)