Flutter Writing custom platform-specific code
https://flutter.dev/docs/development/platform-integration/platform-channels
The following sample demonstrates how to call a platform-specific API to retrieve and display the current battery level.
Android platform-specific implementation using Java
iOS platform-specific implementation using Objective-C
https://github.com/unsolublesugar/flutter-sample-custom-platform-specific-code