I was trying to implement local_auth package into my Flutter app.
in the documentation, it was mentioned that it will have to use FlutterFragmentActivity instead of FlutterActivity in my MainActivity class.
So I wanted to know what are the main differences between FlutterFragmentActivity and FlutterActivity and how both impact app's performance?
:) as I don't want to make a change and break the app in production.
A FragmentActivity is a subclass of Activity that was built for the Android Support Package.
The FragmentActivity class adds a couple of new methods to ensure compatibility with older versions of Android, but other than that, there really isn't much of a difference between the two.
https://developer.android.com/topic/libraries/support-library
Info from this thread https://stackoverflow.com/a/10478048/7198006
So, it doesn't impact performance.
In my apps, I see those activities act differently when you press back button (or perform back gesture) at the root screen of your app:
FlutterActivity: Your app will be closed.
FlutterFragmentActivity : Your app will be move to background.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With