flutter_background
isn't really maintained and causes some compatibility issues with newer Android versions.
Switch to flutter_local_notifications
' startForegroundService method.
Also see https://developer.android.com/about/versions/14/changes/fgs-types-required#use-cases
Another option would be https://pub.dev/packages/flutter_background_service
flutter_local_notifications
doesn't support keeping a wake/wifi lock so isn't a complete replacement.flutter_background
got a new release so this issue is no longer relevant.