f4bb5104e2
- Introduced AppColors class to centralize color definitions for better maintainability and consistency. - Updated various screens (Settings, Vault Access, Note Card, etc.) to use AppColors for styling instead of hardcoded colors. - Enhanced UI elements with improved color contrast and accessibility. - Replaced gradient backgrounds with defined color schemes for a cohesive look. - Refactored button styles and text colors to align with the new theme structure.
118 lines
4.8 KiB
Dart
118 lines
4.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:notas/theme/app_colors.dart';
|
|
|
|
class BiometricChoiceScreen extends StatelessWidget {
|
|
const BiometricChoiceScreen({
|
|
super.key,
|
|
required this.isBusy,
|
|
required this.onEnableBiometrics,
|
|
required this.onSkipBiometrics,
|
|
});
|
|
|
|
final bool isBusy;
|
|
final Future<void> Function() onEnableBiometrics;
|
|
final Future<void> Function() onSkipBiometrics;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Container(
|
|
decoration: const BoxDecoration(gradient: AppColors.backdropGradient),
|
|
child: SafeArea(
|
|
child: Column(
|
|
children: [
|
|
Expanded(
|
|
child: Center(
|
|
child: SingleChildScrollView(
|
|
padding: const EdgeInsets.all(24),
|
|
child: ConstrainedBox(
|
|
constraints: const BoxConstraints(maxWidth: 460),
|
|
child: Container(
|
|
padding: const EdgeInsets.all(24),
|
|
decoration: BoxDecoration(
|
|
color: AppColors.surface,
|
|
borderRadius: BorderRadius.circular(24),
|
|
border: Border.all(color: AppColors.borderMuted),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: AppColors.shadow,
|
|
blurRadius: 30,
|
|
offset: const Offset(0, 18),
|
|
),
|
|
],
|
|
),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
Icon(
|
|
Icons.fingerprint,
|
|
size: 44,
|
|
color: IconTheme.of(context).color,
|
|
),
|
|
const SizedBox(height: 16),
|
|
const Text(
|
|
'Proteger con huella',
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
color: AppColors.textPrimary,
|
|
fontSize: 28,
|
|
fontWeight: FontWeight.w700,
|
|
),
|
|
),
|
|
const SizedBox(height: 10),
|
|
Text(
|
|
'¿Quieres que la app te pida huella o cara antes de entrar a tus notas?',
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
color: AppColors.textSecondary,
|
|
height: 1.4,
|
|
),
|
|
),
|
|
const SizedBox(height: 22),
|
|
FilledButton(
|
|
onPressed: isBusy ? null : onEnableBiometrics,
|
|
style: FilledButton.styleFrom(
|
|
padding: const EdgeInsets.symmetric(
|
|
vertical: 14,
|
|
),
|
|
),
|
|
child: isBusy
|
|
? const SizedBox(
|
|
width: 18,
|
|
height: 18,
|
|
child: CircularProgressIndicator(
|
|
strokeWidth: 2,
|
|
),
|
|
)
|
|
: const Text('Sí, activar huella'),
|
|
),
|
|
const SizedBox(height: 10),
|
|
OutlinedButton(
|
|
onPressed: isBusy ? null : onSkipBiometrics,
|
|
style: OutlinedButton.styleFrom(
|
|
padding: const EdgeInsets.symmetric(
|
|
vertical: 14,
|
|
),
|
|
side: const BorderSide(
|
|
color: AppColors.textDisabled,
|
|
),
|
|
foregroundColor: AppColors.textPrimary,
|
|
),
|
|
child: const Text('No, entrar sin huella'),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|