Skip to content

Commit

Permalink
fix: 🚨 Update linter and fixed pana warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Ujas-Majithiya <[email protected]>
  • Loading branch information
Ujas-Majithiya authored and ujas-m-simformsolutions committed Mar 5, 2024
1 parent 1f21a96 commit a35d436
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include: package:flutter_lints/flutter.yaml
include: package:lints/core.yaml

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
2 changes: 1 addition & 1 deletion lib/src/base/audio_waveforms_interface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class AudioWaveformsInterface {
});
return result ?? false;
}

///platform call to set rate
Future<bool> setRate(double rate, String key) async {
var result = await _methodChannel.invokeMethod(Constants.setRate, {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/controllers/player_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class PlayerController extends ChangeNotifier {
void dispose() async {
if (playerState != PlayerState.stopped) await stopPlayer();
await release();
PlatformStreams.instance.playerControllerFactory.remove(this);
PlatformStreams.instance.playerControllerFactory.remove(playerKey);
if (PlatformStreams.instance.playerControllerFactory.length == 1) {
PlatformStreams.instance.dispose();
}
Expand All @@ -296,7 +296,7 @@ class PlayerController extends ChangeNotifier {
void stopAllPlayers() async {
PlatformStreams.instance.dispose();
await AudioWaveformsInterface.instance.stopAllPlayers();
PlatformStreams.instance.playerControllerFactory.remove(this);
PlatformStreams.instance.playerControllerFactory.clear();
}

/// Sets [_shouldRefresh] flag with provided boolean parameter.
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://github.com/SimformSolutionsPvtLtd/audio_waveforms
issue_tracker: https://github.com/SimformSolutionsPvtLtd/audio_waveforms/issues

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.12.0 <4.0.0"
flutter: ">=1.20.0"

dependencies:
Expand All @@ -15,7 +15,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.1
lints: ^3.0.0

flutter:
plugin:
Expand Down

0 comments on commit a35d436

Please sign in to comment.