Detect with Firebase ML Kit + Draw with CustomPainter

Image for post
Image for post

In this article, we’ll explore the basics of detecting faces within an image with Firebase ML Kit and make it visible with the help of CustomPainter.


  • Get an image and convert it into a format that can be understood by our ML Kit.
  • Feed the image to the detector and get it to scan the image for possible faces.
  • Pull out the faces found and feed it to the CustomPainter.
  • Allow the CustomPainter to get the coordinates of the faces and then use them to draw rects.


We will need the and packages to work out this project.


Step 1 — Firebase Project and…

Deploy a Flutter web app to Github

Flutter isn’t just a mobile framework but Web Apps too
Flutter isn’t just a mobile framework but Web Apps too
Flutter now has experimental support for Web. (Image source: Skywell Software)

Flutter Web has been in Technical Preview for some time now and has now been merged with the master flutter branch.

Flutter now has early experimental support for running flutter web applications. There are still many missing features and known performance issues, so it isn’t recommended for production use.

In this article, we’ll build and deploy a simple web app to Github using Flutter .

Set Up the Chrome Environment

First, we want to make sure we have the latest version of Flutter and also be on at least the master branch. Run this in a terminal:

$ flutter channel master
$ flutter upgrade
Image for post
Image for post
Wait for it to finish doing it’s thing and we’ll be up and running within seconds.

Once on the latest version, let’s set up Flutter to work with Chrome Browser as a device. Run…


Akora Ing. DKB

Flutter Developer | Android (Java/Kotlin) | Dart | Arduino | Node.js | Python. Electrical Engineering Student, KNUST and Member of the Flutter Ghana Community.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store