biometric_auth_flutter 0.0.1
biometric_auth_flutter: ^0.0.1 copied to clipboard
A Flutter plugin for Android biometric authentication using MethodChannels.
biometric_auth_flutter #
A simple Flutter plugin that enables biometric authentication on Android using method channels. Supports fingerprint, face unlock, and device credentials like PIN or pattern.
โจ Features #
- ๐ Authenticate users using biometrics or device credentials.
- ๐ก Native Android biometric prompt.
- โ๏ธ Simple and lightweight API.
- ๐ฑ Android platform supported.
๐ Getting Started #
1. Add dependency #
In your pubspec.yaml:
dependencies:
biometric_auth_flutter: ^0.0.1
2. Import it #
import 'package:biometric_auth_flutter/biometric_auth_flutter.dart';
3. Use it #
final isAuthenticated = await BiometricAuthFlutter().authenticate();
if (isAuthenticated) {
// Navigate to secure area
} else {
// Show fallback or error
}
๐ฆ Platform Support #
| Platform | Supported |
|---|---|
| Android | โ YES |
| iOS | โ Not yet |
iOS support will be added in a future release. PRs are welcome!
๐งช Example #
Use the plugin in your authentication screen like this:
ElevatedButton(
onPressed: () async {
bool auth = await BiometricAuthFlutter().authenticate();
if (auth) {
// proceed
} else {
// handle failure
}
},
child: Text("Login with Biometrics"),
);
๐ง How It Works #
This plugin uses AndroidX BiometricPrompt APIs under the hood and communicates with Flutter via MethodChannel.
๐ ๏ธ Development #
Run tests #
flutter test
Folder Structure #
lib/
biometric_auth_flutter.dart # Public API
biometric_auth_flutter_method_channel.dart
biometric_auth_flutter_platform_interface.dart
android/
... # Kotlin native code
๐ License #
This project is licensed under the MIT License - see the LICENSE file for details.
๐ค Author #
Muhaimin K P M ๐ Kondotty, Kerala, India ๐ GitHub ๐ง [email protected]
๐ก Contributions #
Feel free to open issues or submit PRs if you'd like to contribute. Thank you for helping improve the plugin! ๐
---
## โ
Summary
- This `README.md` includes:
- Plugin description
- Installation
- Usage
- Platform support
- Author info (you)
- Contribution instructions
- License and badges
---
Let me know if you'd also like:
- A basic `example/` Flutter app to demo this
- Banner image or pub.dev thumbnail
- GitHub Actions CI for testing automatically
Would you like me to generate that too?
# biometric_auth_flutter
[](https://pub.dev/packages/biometric_auth_flutter)
A simple Flutter plugin that enables biometric authentication on Android using method channels. Supports fingerprint, face unlock, and device credentials like PIN or pattern.
---
## โจ Features
- ๐ Authenticate users using biometrics or device credentials.
- ๐ก Native Android biometric prompt.
- โ๏ธ Simple and lightweight API.
- ๐ฑ Android platform supported.
---
## ๐ Getting Started
### 1. Add dependency
In your `pubspec.yaml`:
```yaml
dependencies:
biometric_auth_flutter: ^0.0.1
2. Import it #
import 'package:biometric_auth_flutter/biometric_auth_flutter.dart';
3. Use it #
final isAuthenticated = await BiometricAuthFlutter().authenticate();
if (isAuthenticated) {
// Navigate to secure area
} else {
// Show fallback or error
}
๐ฆ Platform Support #
| Platform | Supported |
|---|---|
| Android | โ YES |
| iOS | โ Not yet |
iOS support will be added in a future release. PRs are welcome!
๐งช Example #
Use the plugin in your authentication screen like this:
ElevatedButton(
onPressed: () async {
bool auth = await BiometricAuthFlutter().authenticate();
if (auth) {
// proceed
} else {
// handle failure
}
},
child: Text("Login with Biometrics"),
);
๐ง How It Works #
This plugin uses AndroidX BiometricPrompt APIs under the hood and communicates with Flutter via MethodChannel.
๐ ๏ธ Development #
Run tests #
flutter test
Folder Structure #
lib/
biometric_auth_flutter.dart # Public API
biometric_auth_flutter_method_channel.dart
biometric_auth_flutter_platform_interface.dart
android/
... # Kotlin native code
๐ License #
This project is licensed under the MIT License - see the LICENSE file for details.
๐ค Author #
Muhaimin K P M ๐ Kondotty, Kerala, India ๐ GitHub ๐ง [email protected]
๐ก Contributions #
Feel free to open issues or submit PRs if you'd like to contribute. Thank you for helping improve the plugin! ๐