Here is the updated README.md and LICENSE file for your biometric_auth_flutter package, with the improvements applied:
β
Updated README.md
# 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.8
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
src/biometric_auth_flutter_method_channel.dart
src/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 Pallikkal π Kondotty, Kerala, India π GitHub π§ muhaiminpallikkal@gmail.com
π‘ Contributions
Feel free to open issues or submit PRs if you'd like to contribute. Thank you for helping improve the plugin! π
ποΈ Changelog
See CHANGELOG.md for version history and changes.
---
### π LICENSE (MIT License)
```text
MIT License
Copyright (c) 2025 Muhaimin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the βSoftwareβ), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED βAS ISβ, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.