style: weitere flutter-analyze Infos beheben
Ungenutzte Imports (dart:typed_data, flutter/services.dart), unnötige String-Interpolations-Klammern, führender Unterstrich bei lokaler Funktion, fehlende Blockklammern bei if-Statements und SCREAMING_CASE-Konstanten in clipboard_image.dart auf lowerCamelCase umbenannt. Rein mechanisch, keine Verhaltensänderung. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart' hide Visibility;
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:pyramid/core/app_state.dart';
|
||||
@@ -189,11 +188,13 @@ class _CreateJoinDialogState extends ConsumerState<CreateJoinDialog> {
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
if (mounted) setState(() {
|
||||
_discoverLoading = false;
|
||||
_discoverLoadingMore = false;
|
||||
_discoverError = e.toString().split('\n').first;
|
||||
});
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_discoverLoading = false;
|
||||
_discoverLoadingMore = false;
|
||||
_discoverError = e.toString().split('\n').first;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:crypto/crypto.dart' as mcrypto;
|
||||
import 'package:pyramid/core/fcm_push_service.dart';
|
||||
@@ -3666,17 +3665,21 @@ class _EncryptionSectionState extends ConsumerState<_EncryptionSection> {
|
||||
final file = File('${dir.path}/pyramid_keys_$stamp.txt');
|
||||
await file.writeAsString(encrypted);
|
||||
|
||||
if (mounted) setState(() {
|
||||
_exportLoading = false;
|
||||
_keyFileMsgIsError = false;
|
||||
_keyFileMsg = '${sessions.length} Schlüssel exportiert → ${file.path}';
|
||||
});
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_exportLoading = false;
|
||||
_keyFileMsgIsError = false;
|
||||
_keyFileMsg = '${sessions.length} Schlüssel exportiert → ${file.path}';
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
if (mounted) setState(() {
|
||||
_exportLoading = false;
|
||||
_keyFileMsgIsError = true;
|
||||
_keyFileMsg = 'Export fehlgeschlagen: ${e.toString().split('\n').first}';
|
||||
});
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_exportLoading = false;
|
||||
_keyFileMsgIsError = true;
|
||||
_keyFileMsg = 'Export fehlgeschlagen: ${e.toString().split('\n').first}';
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3753,17 +3756,21 @@ class _EncryptionSectionState extends ConsumerState<_EncryptionSection> {
|
||||
} catch (_) { continue; }
|
||||
}
|
||||
|
||||
if (mounted) setState(() {
|
||||
_importLoading = false;
|
||||
_keyFileMsgIsError = false;
|
||||
_keyFileMsg = '$imported von ${sessions.length} Schlüssel importiert.';
|
||||
});
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_importLoading = false;
|
||||
_keyFileMsgIsError = false;
|
||||
_keyFileMsg = '$imported von ${sessions.length} Schlüssel importiert.';
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
if (mounted) setState(() {
|
||||
_importLoading = false;
|
||||
_keyFileMsgIsError = true;
|
||||
_keyFileMsg = 'Import fehlgeschlagen: ${e.toString().split('\n').first}';
|
||||
});
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_importLoading = false;
|
||||
_keyFileMsgIsError = true;
|
||||
_keyFileMsg = 'Import fehlgeschlagen: ${e.toString().split('\n').first}';
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user