Skip to content

Commit 6497d24

Browse files
rename
1 parent 633fced commit 6497d24

File tree

5 files changed

+18
-17
lines changed

5 files changed

+18
-17
lines changed

flutter_vlc_player/example/lib/main.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ class App extends StatefulWidget {
1717
}
1818

1919
class _AppState extends State<App> {
20-
static const _length = 2;
20+
static const _tabCount = 2;
21+
2122
@override
2223
Widget build(BuildContext context) {
2324
return DefaultTabController(
24-
length: _length,
25+
length: _tabCount,
2526
child: Scaffold(
2627
appBar: AppBar(
2728
centerTitle: true,

flutter_vlc_player/example/lib/single_tab.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class SingleTab extends StatefulWidget {
1414

1515
class _SingleTabState extends State<SingleTab> {
1616
static const _networkCaching = 2000;
17-
static const _fontSize = 30;
17+
static const _subtitlesFontSize = 30;
1818
static const _height = 400.0;
1919

2020
final _key = GlobalKey<VlcPlayerWithControlsState>();
@@ -100,7 +100,7 @@ class _SingleTabState extends State<SingleTab> {
100100
]),
101101
subtitle: VlcSubtitleOptions([
102102
VlcSubtitleOptions.boldStyle(true),
103-
VlcSubtitleOptions.fontSize(_fontSize),
103+
VlcSubtitleOptions.fontSize(_subtitlesFontSize),
104104
VlcSubtitleOptions.outlineColor(VlcSubtitleColor.yellow),
105105
VlcSubtitleOptions.outlineThickness(VlcSubtitleThickness.normal),
106106
// works only on externally added subtitles

flutter_vlc_player/example/lib/vlc_player_with_controls.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class VlcPlayerWithControls extends StatefulWidget {
2727
class VlcPlayerWithControlsState extends State<VlcPlayerWithControls>
2828
with AutomaticKeepAliveClientMixin {
2929
static const _playerControlsBgColor = Colors.black87;
30-
static const _positionedOffset1 = 8.0;
31-
static const _positionedOffset2 = 10.0;
30+
static const _numberPositionOffset = 8.0;
31+
static const _recordingPositionOffset = 10.0;
3232
static const _positionedBottomSpace = 7.0;
3333
static const _positionedRightSpace = 3.0;
3434
static const _hundred = 100.0;
@@ -149,8 +149,8 @@ class VlcPlayerWithControlsState extends State<VlcPlayerWithControls>
149149
onPressed: _getSubtitleTracks,
150150
),
151151
Positioned(
152-
top: _positionedOffset1,
153-
right: _positionedOffset1,
152+
top: _numberPositionOffset,
153+
right: _numberPositionOffset,
154154
child: IgnorePointer(
155155
child: Container(
156156
decoration: BoxDecoration(
@@ -183,8 +183,8 @@ class VlcPlayerWithControlsState extends State<VlcPlayerWithControls>
183183
onPressed: _getAudioTracks,
184184
),
185185
Positioned(
186-
top: _positionedOffset1,
187-
right: _positionedOffset1,
186+
top: _numberPositionOffset,
187+
right: _numberPositionOffset,
188188
child: IgnorePointer(
189189
child: Container(
190190
decoration: BoxDecoration(
@@ -304,8 +304,8 @@ class VlcPlayerWithControlsState extends State<VlcPlayerWithControls>
304304
),
305305
),
306306
Positioned(
307-
top: _positionedOffset2,
308-
left: _positionedOffset2,
307+
top: _recordingPositionOffset,
308+
left: _recordingPositionOffset,
309309
child: AnimatedOpacity(
310310
opacity: recordingTextOpacity,
311311
duration: const Duration(seconds: 1),

flutter_vlc_player/lib/src/vlc_player_controller.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import 'package:flutter_vlc_player_platform_interface/flutter_vlc_player_platfor
2222
///
2323
/// After [dispose] all further calls are ignored.
2424
class VlcPlayerController extends ValueNotifier<VlcPlayerValue> {
25-
static const _volumeMaxLimit = 100;
25+
static const _maxVolume = 100;
2626

2727
/// The URI to the video file. This will be in different formats depending on
2828
/// the [DataSourceType] of the original video.
@@ -572,7 +572,7 @@ class VlcPlayerController extends ValueNotifier<VlcPlayerValue> {
572572
/// linear scale.
573573
Future<void> setVolume(int volume) async {
574574
_throwIfNotInitialized('setVolume');
575-
value = value.copyWith(volume: volume.clamp(0, _volumeMaxLimit));
575+
value = value.copyWith(volume: volume.clamp(0, _maxVolume));
576576
await vlcPlayerPlatform.setVolume(_viewId, value.volume);
577577
}
578578

@@ -581,7 +581,7 @@ class VlcPlayerController extends ValueNotifier<VlcPlayerValue> {
581581
_throwIfNotInitialized('getVolume');
582582
final volume =
583583
await (vlcPlayerPlatform.getVolume(_viewId) as FutureOr<int>);
584-
value = value.copyWith(volume: volume.clamp(0, _volumeMaxLimit));
584+
value = value.copyWith(volume: volume.clamp(0, _maxVolume));
585585

586586
return volume;
587587
}

flutter_vlc_player/lib/src/vlc_player_value.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class VlcPlayerValue {
1010
/// Define no error string
1111
static const String noError = '';
1212
static const String unknownError = 'An Unknown Error Occurred!';
13-
static const _volumeMaxLimit = 100;
13+
static const _maxVolume = 100;
1414

1515
/// The total duration of the video.
1616
///
@@ -122,7 +122,7 @@ class VlcPlayerValue {
122122
this.isEnded = false,
123123
this.isRecording = false,
124124
this.bufferPercent = 0.0,
125-
this.volume = _volumeMaxLimit,
125+
this.volume = _maxVolume,
126126
this.playbackSpeed = 1.0,
127127
this.videoScale = 1.0,
128128
this.audioTracksCount = 1,

0 commit comments

Comments
 (0)