guardo 0.1.0 copy "guardo: ^0.1.0" to clipboard
guardo: ^0.1.0 copied to clipboard

A Flutter package that provides secure app entry point with auto-locking, biometric authentication, and lifecycle management.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.1.0 - 2024-12-19 #

🎉 New Features #

Smart Authentication Detection

  • Automatic Bypass: Guardo now automatically detects when authentication methods are unavailable and gracefully bypasses authentication
  • hasAuthenticationMethods(): New method to check if any authentication methods are available on the device
  • BypassedState: New state to handle scenarios where authentication is bypassed due to unavailable methods

Complete Authentication Control

  • enabled Property: New enabled property on Guardo widget allows complete enable/disable of authentication
  • isGuardoEnabled(): New extension method to check if Guardo is currently enabled/functional
  • Perfect for Testing: Easy to disable authentication in debug mode or for testing environments

Enhanced Error Handling

  • Async lockApp(): lockApp() method is now async and provides better error handling
  • UnsupportedError: Clear error messages when trying to lock on devices without authentication methods
  • Smart Error Messages: More descriptive error messages for different scenarios

Developer Experience Improvements

  • Better State Management: Improved handling of authentication states across app lifecycle
  • Enhanced Logging: More detailed logging for authentication flow debugging
  • Comprehensive Documentation: Updated README with new features and examples

🔧 Technical Improvements #

Core Changes

  • Added BypassedState to the state management system
  • Enhanced GuardoService with hasAuthenticationMethods getter
  • Improved initialization flow to check authentication availability first
  • Updated lifecycle management to respect enabled/disabled state

API Updates

  • lockApp() is now Future<void> lockApp() (breaking change)
  • Added Future<bool> hasAuthenticationMethods() extension method
  • Added bool isGuardoEnabled() extension method
  • Added enabled: bool property to Guardo widget (defaults to true)

📚 Documentation #

  • Updated README.md with comprehensive examples of new features
  • Added "What's New" section highlighting v0.1.0 features
  • Enhanced troubleshooting guide with new scenarios
  • Updated API reference with new methods and properties

🐛 Bug Fixes #

  • Fixed BuildContext async gap warning in example app
  • Improved error handling when authentication methods are unavailable
  • Better state management for edge cases

⚠️ Breaking Changes #

  • context.lockApp() is now async: await context.lockApp()
  • Apps using lockApp() will need to add await and handle potential UnsupportedError

🔄 Migration Guide #

For lockApp() Usage

// Before (v0.0.1)
context.lockApp();

// After (v0.1.0)
try {
  await context.lockApp();
} catch (e) {
  // Handle case where authentication is disabled/unavailable
  print('Cannot lock: $e');
}

Using New Features

// Enable/disable authentication
Guardo(
  enabled: !kDebugMode, // Disable in debug mode
  child: MyApp(),
)

// Check authentication availability
if (await context.hasAuthenticationMethods()) {
  await context.lockApp(); // Safe to lock
}

// Check if Guardo is enabled
if (context.isGuardoEnabled()) {
  // Authentication is active
}

0.0.1 - 2024-12-18 #

🎉 Initial Release #

Core Features

  • Biometric Authentication: Support for fingerprint, Face ID, and other biometric methods
  • Device Credentials Fallback: Automatic fallback to PIN/Pattern/Password when biometrics are locked out
  • Automatic Lockout Handling: Smart handling of temporary and permanent biometric lockouts
  • Customizable Lock Screens: Build your own lock screen or use the default
  • Auto-lock Timer: Configurable inactivity timeout
  • App Lifecycle Management: Proper handling of app resume/pause states

Developer Experience

  • Extension Methods: Convenient BuildContext extensions for easy integration
  • Comprehensive Error Handling: Typed exceptions with detailed error information
  • State Management: Built-in state notifier with reactive updates
  • Debug Support: Extensive logging and debugging capabilities

Authentication Actions

  • Secure Actions: Execute actions that require authentication
  • Async Actions: Handle asynchronous operations with authentication
  • Actions with Results: Execute operations that require authentication and return values
  • Device Capability Checks: Check device biometric capabilities

Platform Support

  • iOS: Face ID, Touch ID support (iOS 9.0+)
  • Android: Fingerprint, Face, Iris support (Android API 23+)
  • Cross-platform: Consistent API across both platforms

UI Components

  • Multiple States: Loading, authenticated, locked, error, and failed states
  • Theme Support: Light and dark theme compatibility
  • Accessibility: Full screen reader support and WCAG compliance
  • Customizable: Extensive customization options for UI components
9
likes
150
points
30
downloads

Publisher

verified publisherqomrah.ly

Weekly Downloads

A Flutter package that provides secure app entry point with auto-locking, biometric authentication, and lifecycle management.

Repository (GitHub)
View/report issues

Topics

#security #authentication #biometric #app-lock #privacy

Documentation

API reference

License

MIT (license)

Dependencies

flutter, local_auth

More

Packages that depend on guardo