In case someone is getting the similar issue in the Flutter. You can make the following changes to your app/build.gradle file.
allprojects {
repositories {
google()
mavenCentral()
}
configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.facebook.android' &&
details.requested.name == 'facebook-android-sdk') {
details.useVersion '18.1.3'
}
}
}
}