buildDefaultLockScreen method
Builds the default lock screen widget
Implementation
Widget buildDefaultLockScreen(BuildContext context, VoidCallback onTap) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Padding(
padding: const EdgeInsets.all(32.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.fingerprint,
size: 80,
color: Theme.of(context).colorScheme.primary,
semanticLabel: 'Biometric authentication icon',
),
const SizedBox(height: 24),
const Text(
'App Locked',
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
semanticsLabel: 'Application is currently locked',
),
const SizedBox(height: 16),
Text(
'Please authenticate to access the app',
style: TextStyle(fontSize: 16, color: Colors.grey[600]),
textAlign: TextAlign.center,
),
const SizedBox(height: 8),
Text(
'Touch the button to use biometric authentication',
style: TextStyle(
fontSize: 14,
color: Theme.of(context).colorScheme.primary,
),
textAlign: TextAlign.center,
),
const SizedBox(height: 32),
ElevatedButton.icon(
onPressed: onTap,
icon: const Icon(Icons.fingerprint),
label: const Text('Unlock with Biometrics'),
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(
horizontal: 32,
vertical: 16,
),
),
),
],
),
),
),
),
);
}