inway / flutter_ringtone_player

Simple Flutter plugin to play ringtone, alarm & notification sounds
MIT License
89 stars 57 forks source link

Member not found: 'FlutterRingtonePlayer.play'. #66

Closed katunins closed 7 months ago

katunins commented 7 months ago

flutter_ringtone_player: ^4.0.0+1 main.dart

Error:

Failed to build iOS app Error (Xcode): lib/main.dart:82:25: Error: Member not found: 'FlutterRingtonePlayer.play'.

... FlutterRingtonePlayer.play( android: AndroidSounds.notification, ios: IosSounds.sentMessage, volume: 0.1, // Android only - API >= 28 asAlarm: false, ); ...

IDE: Instance member 'play' can't be accessed using static access

katunins commented 7 months ago

should be update doc in pub.dev -> readme

image
cnkygmr commented 7 months ago

Yes, I installed the latest version, I have this problem.flutter_ringtone_player: ^4.0.0+1

cnkygmr commented 7 months ago

FlutterRingtonePlayer().play(); right way

SPodjasek commented 7 months ago

Sorry missed that during merging one of the latest PRs.

I've just released v4.0.0+2 which should have proper examples in README.md.