Snapchat Filters with Flutter's CustomPainter and MLKit
summary
Builds a Flutter camera app that uses ML Kit face contours to get eyes, nose and forehead points, then paints props with Flutter Canvas/CustomPainter. Uses the ML Kit sample for detection, computes a tilt angle with basic trigonometry and applies canvas.translate + rotate so a PNG hat follows head rotation; scale by distance is not implemented and placement jitters a bit but is functional. Adds color overlays via canvas.drawColor and exports selfies for sharing.
AI-written summary · about
chapters (5)
- 0:00Introduction
- 2:43Project overview
- 6:27Understanding canvas
- 11:44Custom painter basics
- 22:04Implementing the filter
related talks
46mRealtime Face Detection with Firebase ML Kit
42mSmartly Smartest Apps with Cross-Platform Machine Learning (Using Flutter and ML Kit)
32mFlutter + ML Kit: Building smart cross-platform apps
39mNow smile (also in 3D)! Exploring AR, ML and Camera related APIs on Android
37mNative Platform Views for mobile and beyond
37mFlutter Development
32mCode Meets Art: Flutter for Creative Coding
17mFlutter Widgets Probably Haven’t Heard Of
