Prerequisites:
- In your
android/app/build.gradle
, update yourminSdkVersion
in your default config :
defaultConfig {
// others configs
minSdkVersion 21
}
-
If you are using
FlutterActivity
directly, change it toFlutterFragmentActivity
in yourAndroidManifest.xml
. -
If you are using a custom activity, update your
MainActivity.java
:import io.flutter.embedding.android.FlutterFragmentActivity; public class MainActivity extends FlutterFragmentActivity { // ... }
or
MainActivity.kt
:import io.flutter.embedding.android.FlutterFragmentActivity class MainActivity: FlutterFragmentActivity() { // ... }
to inherit from
FlutterFragmentActivity
. -
Use a theme that inherits MaterialTheme for the Android theme to apply to the FlutterFragmentActivity as soon as the Android process has started
For example :
- In your
android/app/build.gradle
, you can add this dependency
dependencies { implementation "com.google.android.material:material:1.5.0" // your others dependencies }
-
In your
android/app/src/main/res/values/styles.xml
<!-- Theme applied to the Android Window as soon as the process has started. This theme determines the color of the Android Window while your Flutter UI initializes, as well as behind your Flutter UI while its running. This Theme is only used starting with V2 of Flutter's Android embedding. --> <style name="NormalTheme" parent="@style/Theme.Material3.Light.NoActionBar"> <!-- Or any other material theme that you want --> <item name="android:windowBackground">?android:colorBackground</item> </style>
Don't forget to change it as well in your
android/app/src/main/res/values-night/styles.xml
if you need to
- In your
Prerequisites:
- In your
ios/Podfile
, update your ios sdk version :
platform :ios, '11.0'
This sdk is the flutter interface implementation of the android and ios sdks of Lyra
If you want more informations about Lyra, here is their website
We are a 100 people company developing and designing multiplatform applications with React Native and Flutter using the Lean & Agile methodology. To get more information on the solutions that would suit your needs, feel free to get in touch by email or through contact form!
We will always answer you with pleasure π