refactored data providers with centralized cache resolution, unified UI using custom dialogs and bottom sheets, and enhanced network error handling for Dio and TLS errors

This commit is contained in:
2026-05-08 20:01:45 +02:00
parent c62a14645a
commit 9e139b5704
37 changed files with 595 additions and 753 deletions
+9 -5
View File
@@ -81,7 +81,7 @@ class _DeferredPdfViewerState extends State<_DeferredPdfViewer> {
}
class _FileViewerState extends State<FileViewer> {
PhotoViewController photoViewController = PhotoViewController();
final PhotoViewController photoViewController = PhotoViewController();
late SettingsCubit settings = context.read<SettingsCubit>();
late bool openExternal;
@@ -92,6 +92,12 @@ class _FileViewerState extends State<FileViewer> {
super.initState();
}
@override
void dispose() {
photoViewController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
AppBar appbar({List<Widget> actions = const []}) => AppBar(
@@ -195,10 +201,8 @@ class _FileViewerState extends State<FileViewer> {
OpenFilex.open(widget.path).then((result) {
if (!context.mounted) return;
Navigator.of(context).pop();
if(result.type != ResultType.done) {
showDialog(context: context, builder: (context) => AlertDialog(
content: Text(result.message),
));
if (result.type != ResultType.done) {
InfoDialog.show(context, result.message);
}
});