It uses the intent(ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS). Which is not recommended unless its an excemtion case. Such as the applications main functionality needs the battery optimisation to be disabled.
Read more here : https://developer.android.com/training/monitoring-device-state/doze-standby#exemption-cases
Credit
This plugin is inspired from battery_optimization but with supporting Null safety and Android V2 embedding