๐Ÿ“ฆ flutter_secure_wrap

flutter_secure_wrap is a lightweight Flutter plugin for masking sensitive content in UI screens. It provides a simple way to blur widgets, toggle visibility manually, and auto-hide them after a duration. Ideal for protecting personal information like OTPs, banking details, and user credentials.

๐Ÿš€ Installation

Add this to your pubspec.yaml:

dependencies:

flutter_secure_wrap: ^0.0.1

Then run:

flutter pub get

Import it in your Dart code:

import 'package:flutter_secure_wrap/flutter_secure_wrap.dart';

๐ŸŽฏ Features

  • Blur content using a backdrop filter
  • Manual toggle with an eye icon (Icons.visibility_off)
  • Optional auto-hide every 30 seconds
  • Customizable icon color
  • Future-ready flag for authentication gating

๐Ÿงช Usage

Basic Example

SecureContent(
  child: Text(
    'Sensitive OTP: 123456',
    style: TextStyle(fontSize: 20),
  ),
)

With Auto Hide and Icon Customization

SecureContent(
  child: Image.network('https://yourdomain.com/private-image.png'),
  iconColor: Colors.redAccent,
  autoHide: true,
)

๐Ÿ›ก๏ธ Parameters

Name Type Description
child Widget Required widget to be masked or revealed
iconColor Color? Optional color for the visibility toggle icon
autoHide bool Automatically hides the content every 30 seconds (default is false)
isAuthEnabled bool Reserved for future: Enables authentication before revealing content

๐Ÿ”ง Customization Tips

  • Set your own iconColor to match brand identity
  • Wrap images, text, or any layout inside SecureContent
  • Combine with state management (e.g., Bloc or Provider) for dynamic control

๐Ÿ“ท Preview

๐Ÿ“˜ Documentation

The plugin is fully documented using dartdoc conventions. Explore the API via your IDE for quick tooltips and descriptions.

๐Ÿ”ฎ Roadmap

  • Add biometric authentication toggle
  • Enable dynamic blur radius customization
  • Support animations while toggling

๐Ÿค Contributing

Pull requests, issues, and suggestions are welcome! Feel free to open a discussion or fork the repo and pitch in.

๐Ÿ’ฌ Support

If this plugin helps you protect sensitive UI elegantly, consider giving it a โญ๏ธ on pub.dev. For bugs or feature requests, open an issue on GitHub.