'onRequestPermissionsResult' overrides nothing

Viewed 2407
1 Answers

Below is the signature of the onRequestPermissionsResult function of FlutterActivity that extends Activity. Note how the permissions parameter differs from your override declaration ?

public void onRequestPermissionsResult(int requestCode,
                                       @NonNull
                                       String[] permissions,
                                       @NonNull
                                       int[] grantResults)

As you can see the parameters are annotated @NonNull which means you can't use the nullable operator and override this as ..., permissions: Array<String?>?, ...

Related