WiFiFlutter
                                
                                 WiFiFlutter copied to clipboard
                                
                                    WiFiFlutter copied to clipboard
                            
                            
                            
                        Installing wifi_scan package results in duplicate classes
I instantiated a new flutter project with;
flutter create --platforms=android wifi_test1
It ran successfully on my Android phone. Then I installed the package with;
flutter pub add wifi_scan 
... and tried to run the app again. It failed with many duplicate utility classes, here's the first dup as an example;
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Che
ckDuplicatesRunnable
   > Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules
jetified-kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and je
tified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10
)
I'm not very experienced with flutter, but this looks like a conflict between an old version of the classes that was pulled in by the plugin somehow, and modern versions that were pre-installed in the project. How to correct it?