Created
July 18, 2024 09:58
-
-
Save mdjastrzebski/aa864f78967a1c2131102c8597044b6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.flutter_brownfield_app | |
import android.app.Application | |
import com.facebook.react.PackageList | |
import com.facebook.react.ReactApplication | |
import com.facebook.react.ReactPackage | |
import com.facebook.react.defaults.DefaultReactNativeHost | |
import com.facebook.soloader.SoLoader | |
class MainApplication: Application(), ReactApplication { | |
// React Native runtime | |
override val reactNativeHost = | |
object : DefaultReactNativeHost(this) { | |
override fun getPackages(): List<ReactPackage> { | |
val packages = PackageList(this).packages.toMutableList() | |
// Packages that cannot be auto-linked yet can be added manually here | |
return packages | |
} | |
override fun getJSMainModuleName(): String = "index" | |
override fun getUseDeveloperSupport() = BuildConfig.DEBUG | |
} | |
override fun onCreate() { | |
super.onCreate() | |
SoLoader.init(this, false) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment