Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: Remove deprecated methods #1583

Merged
merged 2 commits into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions packages/audioplayers/lib/src/global_audio_scope.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:async';

import 'package:audioplayers/src/audio_log_level.dart';
import 'package:audioplayers/src/audio_logger.dart';
import 'package:audioplayers_platform_interface/audioplayers_platform_interface.dart';

Expand All @@ -16,10 +15,6 @@ class GlobalAudioScope {
.where((event) => event.eventType == GlobalAudioEventType.log)
.map((event) => event.logMessage!);

@Deprecated('Use `AudioLogger.logLevel` instead. '
'This will be removed in v5.0.0.')
AudioLogLevel get logLevel => AudioLogger.logLevel;

GlobalAudioScope() {
eventStream = _platform.getGlobalEventStream();
onLog.listen(
Expand All @@ -28,35 +23,6 @@ class GlobalAudioScope {
);
}

@Deprecated('Set `AudioLogger.logLevel` instead. '
'This will be removed in v5.0.0.')
Future<void> changeLogLevel(AudioLogLevel level) async {
AudioLogger.logLevel = level;
}

@Deprecated('Use `AudioLogger.log()` or `AudioLogger.error()` instead. '
'This will be removed in v5.0.0.')
void log(AudioLogLevel level, String message) {
if (level == AudioLogLevel.info) {
AudioLogger.log(message);
} else if (level == AudioLogLevel.error) {
AudioLogger.error(message);
}
}

@Deprecated('Use `AudioLogger.log()` instead. '
'This will be removed in v5.0.0.')
void info(String message) => AudioLogger.log(message);

@Deprecated('Use `AudioLogger.error()` instead. '
'This will be removed in v5.0.0.')
void error(String message) => AudioLogger.error(message);

Future<void> setAudioContext(AudioContext ctx) =>
_platform.setGlobalAudioContext(ctx);

@Deprecated('Use `setAudioContext()` instead. '
'This will be removed in v5.0.0.')
Future<void> setGlobalAudioContext(AudioContext ctx) =>
_platform.setGlobalAudioContext(ctx);
}