Forum Discussion
Flutter sample maybe shows code that's not existing in a new Flutter project using Android Studio
Hi team,
in the DevBlogs article "https://devblogs.microsoft.com/surface-duo/get-started-with-flutter-on-surface-duo/"' step 2 containts the following task:
This code should go right below the GeneratedPluginRegistrant.registerWith(flutterEngine); line
Nevertheless if I copy and paste your example source MainActivity.kt including the method below, everything works but it was for me a little confusing to work with this step's task.
The vanilla activity looked like:
package io.github.tscholze.flutter_app3
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}
tscholze thanks for the feedback, I'll pass on to the author.
Note that when the built-in Flutter support lands you won't need to follow that more manual process 😉
4 Replies
- Craig_Dunn
Microsoft
tscholze thanks for the feedback, I'll pass on to the author.
Note that when the built-in Flutter support lands you won't need to follow that more manual process 😉
- tscholzeIron Contributor
Hi Craig_Dunn,
Thynky for your help! Wow, I hole the foldable support will ne released soon as possible. 🙂
- JWiese
Microsoft
ok, finally had a chance to look at this and it appears that the boilerplate code has changed for the default project structure. They have moved the plugin registration back into the Java code and out of the Kotlin activity. Since we are getting closer to checking in the foldable support into the framework itself I don't think it's worth spending time working all the changes to this post. As Craig said, very soon you won't have to do any of this, it will all be part of Flutter itself.