Handling permission requests in Android for Flutter plugins

While building the Android functionality for a plugin recently I had to handle a system permission request. Although all the parts of that are simple it took me a while to figure out how to put them together. In hopes of making it simpler for others looking to do this here’s all the bits in one place. Note: Code examples are Kotlin, there’s a full gist here. Handling the callback The part that I had to search a bit to pull together was how to handle the Android permission callback in my plugin. The Android documentation for it is here [Read on…]