Repository: flutter
Issue: Guidance for background isolate creation
Labels: engine,d: api docs,P2,a: plugins,team-engine,triaged-engine

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

So it seems like there are quite a few different versions of plugins that deal with creating background isolates to do something (perform a background fetch, respond to location updates, etc.) in the background.

I am currently writing my own location and background sync plugins (I am focused on iOS, my coworker on Android), and a lot of what we are doing is taking bits and pieces from some of these exploratory/example plugins.

I believe having a clear and concise document for developers on background isolate (and isolate creation in general) would help speed up our development but also make the pub.dev packages more robust

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal

This proposal is not really about what I want flutter to do, but more of a documentation request. 

I think it would be super dandy to have a list of a few different things in relation to this topic:
1. Debugging best practices for the different platforms:
	- logging
	- when to debug by running native code vs running flutter application
	- development edge cases/bugs that may or may not occur in a production environment
2. Flutter engine creation and disposal best practices:
	- how long does an engine stay alive (and when it might be destroyed by an OS)
	- when do I need to manually destroy it to prevent leaks
	- what are the performance issues for creating multiple isolates
	- how to check and see if I have created a legion of isolates on accident
3. Other things I might have forgotten

I totally understand that the Native to Flutter APIs are constantly shifting, and this would need to continue to be updated, but with a little guidance, I would love to write this document up and possibly append it to perhaps (https://flutter.dev/docs/development/packages-and-plugins/background-processes) if my writing seems accurate and useful.

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->