Skip to content

Commit

Permalink
Merge pull request #50 from robinbonnes/main
Browse files Browse the repository at this point in the history
Flutter 3.0 fixes
  • Loading branch information
mono0926 authored May 14, 2022
2 parents 3a7fb95 + 7d33707 commit 193b25d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class ActivityHelper(private var applicationContext: Context?,
}

override fun onRequestPermissionsResult(requestCode: Int,
permissions: Array<out String>?,
grantResults: IntArray?
permissions: Array<out String>,
grantResults: IntArray
): Boolean {
if (!permissionResultMap.containsKey(requestCode)) {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ChannelHandler(private val activityHelper: ActivityHelper
result.success(activityHelper.requestCameraAccessIfNecessary(sink))
}

fun startListening(messenger: BinaryMessenger?) {
fun startListening(messenger: BinaryMessenger) {
if (methodChannel != null) {
stopListening()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class RequestCameraPermissionHandler(private val sink: EventChannel.EventSink?
) : PluginRegistry.RequestPermissionsResultListener {

override fun onRequestPermissionsResult(requestCode: Int,
permissions: Array<out String>?,
grantResults: IntArray?
permissions: Array<out String>,
grantResults: IntArray
): Boolean {
if (requestCode != REQ_CAMERA_PERMISSION) {
return false
Expand All @@ -30,7 +30,7 @@ class RequestCameraPermissionHandler(private val sink: EventChannel.EventSink?
* @see onRequestPermissionsResult
*/
private fun verifyPermissions(grantResults: IntArray?): Boolean {
private fun verifyPermissions(grantResults: IntArray): Boolean {
if (grantResults == null) {
return false
}
Expand Down

0 comments on commit 193b25d

Please sign in to comment.