A problem has suddenly recently arisen such that simply by including the dependency in \'location\' in pubspec.yaml like e.g.
dependencies:
flutter:
I had similar issues, and after spending a few good hours on it, to find out the problem is Kotlin, that I created the project without Kotlin and Swift support. The Dart part of the code works fine, but the Android app would crash on launch with Kotlin code but works fine with Java.
To create Flutter project with Kotlin/Swift support from command:
flutter create --org co.uk.sample -i swift -a kotlin --description 'Your Project Description' sample_app
Where --org defines the project path, -i enables Swift, -a enables Kotlin, followed by your app name at the end.