π Blur Lock
A Flutter package that provides a secure card with blur lock overlay, supporting PIN authentication and biometric unlock (fingerprint/face).
β¨ Features
- π Blur overlay to lock sensitive widgets (cards, views, etc.)
- π Unlock with custom PIN
- π Unlock with fingerprint or face (using local_auth)
- π Re-lock anytime with a single tap
- π± Works on both Android & iOS
πΈ Demo

π Installation
Add to your pubspec.yaml
:
dependencies:
blur_lock: ^1.0.0
local_auth: ^2.3.0
shared_preferences: ^2.2.0
Then run:
flutter pub get
βοΈ Setup
Android
In android/app/src/main/kotlin/.../MainActivity.kt use:
import io.flutter.embedding.android.FlutterFragmentActivity
class MainActivity: FlutterFragmentActivity() {
}
Add permissions to AndroidManifest.xml:
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
iOS
In ios/Runner/Info.plist add:
<key>NSFaceIDUsageDescription</key>
<string>We use Face ID to secure your data</string>
π Usage
Initialize a default PIN (optional)
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Set default PIN if not already set
final existingPin = await LockManager.getPin();
if (existingPin == null) {
await LockManager.setPin("1234");
}
runApp(const MyApp());
}
SecureCard Widget
SecureCard(
enableBiometrics: true, // enable fingerprint/face unlock
blurStrength: 12,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Icon(Icons.account_balance_wallet,
size: 40, color: Colors.deepPurple),
SizedBox(height: 12),
Text('Bank Account',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)),
SizedBox(height: 8),
Text('Account No: 1234 5678 9012'),
Text('Balance: βΉ1,23,456'),
],
),
)
π Unlock Options
PIN Unlock: User taps the lock icon β enters PIN β content unlocks.
Biometric Unlock: User taps fingerprint icon β device shows biometric sheet β unlocks on success.
Lock Again: Tap the lock-open