Skip to content

Commit

Permalink
Fixed SimformSolutionsPvtLtd#50 android build error fixed.
Browse files Browse the repository at this point in the history
Fixed SimformSolutionsPvtLtd#41 upgraded flutter to 3.0
  • Loading branch information
DhavalRKansara committed Jul 26, 2022
1 parent 5202f7e commit abf6e3c
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#[0.1.3] - 26 July, 2022

- Fixed [#41](https://github.com/SimformSolutionsPvtLtd/audio_waveforms/issues/41) & [#49](https://github.com/SimformSolutionsPvtLtd/audio_waveforms/issues/49) - Upgrade Package with flutter 3.0.
- Fixed [#50](https://github.com/SimformSolutionsPvtLtd/audio_waveforms/issues/50) & [#57](https://github.com/SimformSolutionsPvtLtd/audio_waveforms/issues/57) & [#65](https://github.com/SimformSolutionsPvtLtd/audio_waveforms/issues/65) - android build error fixed


## [0.1.2] - 11 May, 2022

* Fixed ios resume recording issue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class AudioRecorder : PluginRegistry.RequestPermissionsResultListener {

override fun onRequestPermissionsResult(
requestCode: Int,
permissions: Array<out String>?,
permissions: Array<out String>,
grantResults: IntArray
): Boolean {
return if (requestCode == RECORD_AUDIO_REQUEST_CODE) {
Expand Down
1 change: 1 addition & 0 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:exported="true"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
Expand Down
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
musicFile = result.files.single.path;
await playerController6.preparePlayer(musicFile!);
} else {
print("File not picked");
debugPrint("File not picked");
}
}

Expand Down Expand Up @@ -299,7 +299,7 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
void _playOrPlausePlayer(PlayerController controller) async {
controller.playerState == PlayerState.playing
? await controller.pausePlayer()
: await controller.startPlayer();
: await controller.startPlayer(finishMode: FinishMode.loop);
}

void _startOrStopRecording() async {
Expand Down
8 changes: 4 additions & 4 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ dependencies:
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../
path_provider: ^2.0.9
file_picker: ^4.4.0
path_provider: ^2.0.11
file_picker: ^5.0.0

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
cupertino_icons: ^1.0.5

dev_dependencies:
flutter_test:
Expand All @@ -41,7 +41,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^1.0.0
flutter_lints: ^2.0.1

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
2 changes: 1 addition & 1 deletion lib/src/audio_waveforms.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class _AudioWaveformsState extends State<AudioWaveforms> {
_totalBackDistance =
_totalBackDistance + Offset(widget.waveStyle.spacing, 0.0);
}
WidgetsBinding.instance?.addPostFrameCallback((_) {
WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() {});
});
}
Expand Down
3 changes: 3 additions & 0 deletions lib/src/controllers/player_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,7 @@ class PlayerController extends ChangeNotifier {
bool operator ==(Object other) {
return other is PlayerController && other.playerKey == playerKey;
}

@override
int get hashCode => super.hashCode;
}
2 changes: 1 addition & 1 deletion lib/src/controllers/recorder_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class RecorderController extends ChangeNotifier {

///sets [shouldClearLabels] flag to false
void revertClearlabelCall() {
WidgetsBinding.instance?.addPostFrameCallback((_) {
WidgetsBinding.instance.addPostFrameCallback((_) {
shouldClearLabels = false;
notifyListeners();
});
Expand Down

0 comments on commit abf6e3c

Please sign in to comment.