Skip to content

Commit

Permalink
Upgrade for compliance with Flutter 3
Browse files Browse the repository at this point in the history
See this PR: am15h#58
And this issue: am15h#57
  • Loading branch information
Ashkan-Sarlak authored Dec 3, 2022
1 parent 4fa5115 commit 9c989cb
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,12 @@ class TfliteFlutterHelperPlugin : FlutterPlugin,
}
}

override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>?,
grantResults: IntArray?): Boolean {
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>,
grantResults: IntArray): Boolean {
when (requestCode) {
AUDIO_RECORD_PERMISSION_CODE -> {
if (grantResults != null) {
permissionToRecordAudio = grantResults.isNotEmpty() &&
grantResults[0] == PackageManager.PERMISSION_GRANTED
}
permissionToRecordAudio = grantResults.isNotEmpty() &&
grantResults[0] == PackageManager.PERMISSION_GRANTED
completeInitializeRecorder()
return true
}
Expand Down

0 comments on commit 9c989cb

Please sign in to comment.