blur_lock 0.0.1 copy "blur_lock: ^0.0.1" to clipboard
blur_lock: ^0.0.1 copied to clipboard

A Flutter package to secure your sensitive UI content with a blur effect, PIN authentication, and biometric authentication (fingerprint/face unlock). Easily wrap any widget (like cards, containers, or [...]

πŸ”’ 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
0
likes
140
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package to secure your sensitive UI content with a blur effect, PIN authentication, and biometric authentication (fingerprint/face unlock). Easily wrap any widget (like cards, containers, or dashboards) inside a SecureCard and keep it locked until the user authenticates. Perfect for banking apps, wallet apps, finance dashboards, or any sensitive information display.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, local_auth, shared_preferences

More

Packages that depend on blur_lock