flutter_smartface 0.5.20
flutter_smartface: ^0.5.20 copied to clipboard
Smartface App FFI plugin project.
Flutter SmartFace Plugin #
A Flutter plugin by Visica that provides facial recognition capabilities for both Android and iOS platforms.
Table of Contents #
Installation #
Add the Flutter SmartFace plugin to your project's pubspec.yaml
:
dependencies:
flutter_smarface: ^<latest_version> # Check for the latest version on pub.flutter-io.cn
Then run:
flutter pub get
Platform Setup #
Android Configuration #
1. Configure Maven Repository
Modify your android/build.gradle
file:
allprojects {
repositories {
google()
mavenCentral()
maven {
url = uri(System.getenv("SMARTFACE_MAVEN_URL"))
credentials {
username = "Private-Token"
password = System.getenv("SMARTFACE_MAVEN_TOKEN")
}
}
}
}
Set the required environment variables:
export SMARTFACE_MAVEN_URL="<your_maven_repo_url>"
export SMARTFACE_MAVEN_TOKEN="<your_auth_token>"
Apply them to your terminal profile (~/.bash_profile
, ~/.bashrc
, or ~/.zshrc
) and restart the terminal and IDE.
On Windows:
- Right-click "This PC" or "My Computer" → Properties.
- Click Advanced system settings → Environment Variables.
- Add new variables:
SMARTFACE_MAVEN_URL
SMARTFACE_MAVEN_TOKEN
- Restart your IDE or terminal.
2. Configure ProGuard
If using ProGuard for release builds, add the following to android/app/proguard-rules.pro
:
-keepclassmembers class br.com.visica.sface.** {
*;
}
iOS Configuration #
Configure Swift Package authentication by adding credentials to your ~/.netrc
file:
machine gitlab.com
login <your_gitlab_login>
password <your_gitlab_token>
Set permissions:
chmod 600 ~/.netrc
- XCode will require Swift Package Manager authentication:
[XCode GitLab Credentials]
CI/CD Setup #
For CI/CD environments, set these environment variables:
-
Android:
SMARTFACE_MAVEN_URL
SMARTFACE_MAVEN_TOKEN
-
iOS:
GITLAB_DEPLOY_USERNAME
GITLAB_DEPLOY_TOKEN
Getting Started #
- Obtain Credentials
Contact the Visica support team to request:
- Maven repository URL and token (Android)
- Swift package login and token (iOS)
- Import the Plugin
import 'package:flutter_smarface/flutter_smarface.dart';
- Implementation Example
Check the example
project included in this repository. It demonstrates the full implementation and usage of the plugin’s features.
Support #
For technical assistance or credential requests:
- Contact the Visica support team with your project details.
License #
This plugin is provided under a commercial license. Contact Visica for license terms and usage permissions.