flutter_audio_recorder icon indicating copy to clipboard operation
flutter_audio_recorder copied to clipboard

[fix] a nicer error handling instead of app crash

Open PerrchicK opened this issue 4 years ago • 1 comments

Main Change

  • Now the app won't crash in case the string path represents an invalid URL (probably due to spaces in path).
  • The plugin will return a Flutter error instead.

Tip 💡

Try not to use force unwrap ! unless you want the app to crash. For example, in let dic = call.arguments as! [String : Any] it's still forgiven because this dictionary must exist, unless there's an integration error. Although I personally prefer to use safe unwrap (if let / guard let) in these cases as well.

PerrchicK avatar Aug 30 '20 11:08 PerrchicK

This PR fixes this issue: https://github.com/rmbrone/flutter_audio_recorder/issues/30

PerrchicK avatar Aug 30 '20 11:08 PerrchicK