This article about face detection with flutter where use the mlkit Package to make the Face Detection in flutter. First we must  import the mlkit package into the pubspec.yaml file as follows:


After that, you must upgrade your package View-> Command Palette , type “flutter upgrade package“, and will display:


Now, create new project in Firebase with same name of your flutter app, you can see detail in your project’s manifest.xml (if playing in android) and in the app-level build.gradle (if playing in android).


Download file with name google-services.json in Firebase where you have been created, throw this file in path [projectname]/android/app/. We are using the selected images from the device in this program, but we can anytime change it to select from camera by altering the source in the following line.

And main.dart file like below :

After you write the codes, running the source code and will be show like below :


For complete source code you can see in Here.

Thank you for reading this article about Face Detection In Flutter With MLKit And Firebase, I hope this article is useful for you. You can read other article about Flutter Login With Database SQLite and Visit My Github about Flutter in Here

Face Detection In Flutter With MLKit And Firebase

Leave a Reply

Your email address will not be published. Required fields are marked *