refactor: Improve code formatting and replace print with debugPrint for error logging
This commit is contained in:
+16
-14
@@ -101,7 +101,8 @@ class _NotesAppState extends State<NotesApp>
|
||||
}
|
||||
|
||||
final AppPalette palette = _activePalette();
|
||||
final String message = _syncErrorMessage ?? _syncDetailMessage ?? 'Sincronizando...';
|
||||
final String message =
|
||||
_syncErrorMessage ?? _syncDetailMessage ?? 'Sincronizando...';
|
||||
final double? progress = _syncProgress;
|
||||
final IconData icon;
|
||||
final Color accentColor;
|
||||
@@ -138,7 +139,9 @@ class _NotesAppState extends State<NotesApp>
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(top: BorderSide(color: accentColor.withValues(alpha: 0.45))),
|
||||
border: Border(
|
||||
top: BorderSide(color: accentColor.withValues(alpha: 0.45)),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -591,17 +594,15 @@ class _NotesAppState extends State<NotesApp>
|
||||
if (available) {
|
||||
bool activated = await _vaultService.enableBiometricProtection();
|
||||
while (!activated) {
|
||||
// Ask the user to retry or skip
|
||||
final BuildContext? dialogCtx = _navigatorKey.currentContext;
|
||||
if (dialogCtx == null) {
|
||||
break;
|
||||
}
|
||||
// Ask the user to retry or skip - pass currentContext directly in builder
|
||||
final NavigatorState? navigator = _navigatorKey.currentState;
|
||||
|
||||
final NavigatorState navigator = Navigator.of(dialogCtx);
|
||||
if (navigator == null) break;
|
||||
if (!mounted) return;
|
||||
|
||||
final bool? retry = await showDialog<bool>(
|
||||
context: dialogCtx,
|
||||
builder: (BuildContext context) {
|
||||
context: context,
|
||||
builder: (BuildContext dialogContext) {
|
||||
final AppPalette palette = _activePalette();
|
||||
return AlertDialog(
|
||||
backgroundColor: palette.cardBackground,
|
||||
@@ -1076,10 +1077,11 @@ class _NotesAppState extends State<NotesApp>
|
||||
switchOutCurve: Curves.easeInCubic,
|
||||
transitionBuilder:
|
||||
(Widget child, Animation<double> animation) {
|
||||
final Animation<Offset> slideAnimation = Tween<Offset>(
|
||||
begin: const Offset(0.0, 0.35),
|
||||
end: Offset.zero,
|
||||
).animate(animation);
|
||||
final Animation<Offset> slideAnimation =
|
||||
Tween<Offset>(
|
||||
begin: const Offset(0.0, 0.35),
|
||||
end: Offset.zero,
|
||||
).animate(animation);
|
||||
|
||||
return FadeTransition(
|
||||
opacity: animation,
|
||||
|
||||
Reference in New Issue
Block a user