Skip to content

Commit

Permalink
Merge branch 'master' into video_player/prevent_screensaver
Browse files Browse the repository at this point in the history
  • Loading branch information
swift-kim authored Aug 31, 2023
2 parents fb72684 + 10ea31d commit 6b5569c
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 29 deletions.
6 changes: 6 additions & 0 deletions packages/audioplayers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 3.0.1

* Update audioplayers to 5.1.0.
* Update audioplayers_platform_interface to 6.0.0.
* Update example app.

## 3.0.0

* Update audioplayers to 4.1.0.
Expand Down
5 changes: 3 additions & 2 deletions packages/audioplayers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ This package is not an _endorsed_ implementation of `audioplayers`. Therefore, y

```yaml
dependencies:
audioplayers: ^4.1.0
audioplayers_tizen: ^3.0.0
audioplayers: ^5.1.0
audioplayers_tizen: ^3.0.1

```

Expand Down Expand Up @@ -51,6 +51,7 @@ For detailed information on Tizen privileges, see [Tizen Docs: API Privileges](h
- [x] `AudioPlayer.resume`
- [x] `AudioPlayer.release`
- [x] `AudioPlayer.seek`
- [ ] `AudioPlayer.setBalance` (not supported)
- [x] `AudioPlayer.setVolume`
- [x] `AudioPlayer.setReleaseMode`
- [x] `AudioPlayer.setPlaybackRate`
Expand Down
Binary file not shown.
Binary file added packages/audioplayers/example/assets/coins.wav
Binary file not shown.
1 change: 1 addition & 0 deletions packages/audioplayers/example/assets/invalid.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This represents an invalid audio file.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,30 @@ class _PropertiesWidgetState extends State<PropertiesWidget> {
subtitle: const Text('Source'),
leading: const Icon(Icons.audio_file),
),
ListTile(
title: Text(
widget.player.volume.toString(),
key: const Key('volumeText'),
),
subtitle: const Text('Volume'),
leading: const Icon(Icons.volume_up),
),
ListTile(
title: Text(
widget.player.balance.toString(),
key: const Key('balanceText'),
),
subtitle: const Text('Balance'),
leading: const Icon(Icons.balance),
),
ListTile(
title: Text(
widget.player.playbackRate.toString(),
key: const Key('playbackRateText'),
),
subtitle: const Text('Playback Rate'),
leading: const Icon(Icons.speed),
),
],
);
}
Expand Down
27 changes: 15 additions & 12 deletions packages/audioplayers/example/lib/tabs/audio_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,14 @@ class AudioContextTabState extends State<AudioContextTab>
Widget _genericTab() {
return TabContent(
children: [
Cbx(
'Force Speaker',
value: audioContextConfig.forceSpeaker,
({value}) =>
updateConfig(audioContextConfig.copy(forceSpeaker: value)),
LabeledDropDown<AudioContextConfigRoute>(
label: 'Audio Route',
key: const Key('audioRoute'),
options: {for (final e in AudioContextConfigRoute.values) e: e.name},
selected: audioContextConfig.route,
onChange: (v) => updateConfig(
audioContextConfig.copy(route: v),
),
),
Cbx(
'Duck Audio',
Expand Down Expand Up @@ -151,7 +154,7 @@ class AudioContextTabState extends State<AudioContextTab>
LabeledDropDown<AndroidContentType>(
label: 'contentType',
key: const Key('contentType'),
options: {for (var e in AndroidContentType.values) e: e.name},
options: {for (final e in AndroidContentType.values) e: e.name},
selected: audioContext.android.contentType,
onChange: (v) => updateAudioContextAndroid(
audioContext.android.copy(contentType: v),
Expand All @@ -160,7 +163,7 @@ class AudioContextTabState extends State<AudioContextTab>
LabeledDropDown<AndroidUsageType>(
label: 'usageType',
key: const Key('usageType'),
options: {for (var e in AndroidUsageType.values) e: e.name},
options: {for (final e in AndroidUsageType.values) e: e.name},
selected: audioContext.android.usageType,
onChange: (v) => updateAudioContextAndroid(
audioContext.android.copy(usageType: v),
Expand All @@ -169,7 +172,7 @@ class AudioContextTabState extends State<AudioContextTab>
LabeledDropDown<AndroidAudioFocus?>(
key: const Key('audioFocus'),
label: 'audioFocus',
options: {for (var e in AndroidAudioFocus.values) e: e.name},
options: {for (final e in AndroidAudioFocus.values) e: e.name},
selected: audioContext.android.audioFocus,
onChange: (v) => updateAudioContextAndroid(
audioContext.android.copy(audioFocus: v),
Expand All @@ -178,7 +181,7 @@ class AudioContextTabState extends State<AudioContextTab>
LabeledDropDown<AndroidAudioMode>(
key: const Key('audioMode'),
label: 'audioMode',
options: {for (var e in AndroidAudioMode.values) e: e.name},
options: {for (final e in AndroidAudioMode.values) e: e.name},
selected: audioContext.android.audioMode,
onChange: (v) => updateAudioContextAndroid(
audioContext.android.copy(audioMode: v),
Expand All @@ -191,7 +194,7 @@ class AudioContextTabState extends State<AudioContextTab>
Widget _iosTab() {
final iosOptions = AVAudioSessionOptions.values.map(
(option) {
final options = audioContext.iOS.options.toList();
final options = audioContext.iOS.options;
return Cbx(
option.name,
value: options.contains(option),
Expand All @@ -213,13 +216,13 @@ class AudioContextTabState extends State<AudioContextTab>
LabeledDropDown<AVAudioSessionCategory>(
key: const Key('category'),
label: 'category',
options: {for (var e in AVAudioSessionCategory.values) e: e.name},
options: {for (final e in AVAudioSessionCategory.values) e: e.name},
selected: audioContext.iOS.category,
onChange: (v) => updateAudioContextIOS(
audioContext.iOS.copy(category: v),
),
),
...iosOptions
...iosOptions,
],
);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/audioplayers/example/lib/tabs/controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ class _ControlsTabState extends State<ControlsTab>
EnumTgl<PlayerMode>(
key: const Key('control-player-mode'),
options: {
for (var e in PlayerMode.values)
'control-player-mode-${e.name}': e
for (final e in PlayerMode.values)
'control-player-mode-${e.name}': e,
},
selected: widget.player.mode,
onChange: (playerMode) async {
Expand All @@ -132,8 +132,8 @@ class _ControlsTabState extends State<ControlsTab>
EnumTgl<ReleaseMode>(
key: const Key('control-release-mode'),
options: {
for (var e in ReleaseMode.values)
'control-release-mode-${e.name}': e
for (final e in ReleaseMode.values)
'control-release-mode-${e.name}': e,
},
selected: widget.player.releaseMode,
onChange: (releaseMode) async {
Expand Down
4 changes: 2 additions & 2 deletions packages/audioplayers/example/lib/tabs/logger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class LogView extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(title),
IconButton(onPressed: onDelete, icon: const Icon(Icons.delete))
IconButton(onPressed: onDelete, icon: const Icon(Icons.delete)),
],
),
Expanded(
Expand All @@ -165,7 +165,7 @@ class LogView extends StatelessWidget {
? const TextStyle(color: Colors.red)
: null,
),
Divider(color: Colors.grey.shade400)
Divider(color: Colors.grey.shade400),
],
),
)
Expand Down
6 changes: 3 additions & 3 deletions packages/audioplayers/example/lib/tabs/sources.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:audioplayers_tizen_example/utils.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:http/http.dart' as http;

final localhost = kIsWeb || !Platform.isAndroid ? 'localhost' : '10.0.2.2';
const host = 'https://luan.xyz';
Expand Down Expand Up @@ -86,7 +86,7 @@ class _SourcesTabState extends State<SourcesTab>
Future<void> Function(Source) fun, {
required String url,
}) async {
final bytes = await readBytes(Uri.parse(url));
final bytes = await http.readBytes(Uri.parse(url));
await fun(BytesSource(bytes));
}

Expand Down Expand Up @@ -117,7 +117,7 @@ class _SourcesTabState extends State<SourcesTab>
),
_createSourceTile(
setSourceKey: const Key('setSource-url-remote-mp3-1'),
title: 'Remote URL MP3 1',
title: 'Remote URL MP3 1 (VBR)',
subtitle: 'ambient_c_motion.mp3',
source: UrlSource(mp3Url1),
),
Expand Down
2 changes: 1 addition & 1 deletion packages/audioplayers/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ environment:
flutter: ">=3.3.0"

dependencies:
audioplayers: ^4.1.0
audioplayers: ^5.1.0
audioplayers_tizen:
path: ../
collection: ^1.16.0
Expand Down
4 changes: 2 additions & 2 deletions packages/audioplayers/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: audioplayers_tizen
description: Tizen implementation of the audioplayers plugin.
homepage: https://github.com/flutter-tizen/plugins
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/audioplayers
version: 3.0.0
version: 3.0.1

environment:
sdk: ">=2.18.0 <4.0.0"
Expand All @@ -16,7 +16,7 @@ flutter:
fileName: audioplayers_tizen_plugin.h

dependencies:
audioplayers_platform_interface: ^5.0.1
audioplayers_platform_interface: ^6.0.0
flutter:
sdk: flutter

Expand Down
3 changes: 2 additions & 1 deletion packages/flutter_secure_storage/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class ItemsWidgetState extends State<ItemsWidget> {
child: Text('Delete all'),
),
],
)
),
],
),
body: Column(
Expand Down Expand Up @@ -186,6 +186,7 @@ class ItemsWidgetState extends State<ItemsWidget> {

break;
case _ItemActions.edit:
if (!context.mounted) return;
final result = await showDialog<String>(
context: context,
builder: (context) => _EditItemWidget(item.value),
Expand Down
3 changes: 1 addition & 2 deletions packages/sqflite/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ linter:
- directives_ordering
- empty_catches
- hash_and_equals
- iterable_contains_unrelated_type
- list_remove_unrelated_type
- collection_methods_unrelated_type
- no_adjacent_strings_in_list
- no_duplicate_case_values
- non_constant_identifier_names
Expand Down

0 comments on commit 6b5569c

Please sign in to comment.