Changed saved views handling, changed repository structure with automatic persistence.

This commit is contained in:
Anton Stubenbord
2023-01-08 00:01:04 +01:00
parent 23bcb355b1
commit 3c6c4e63d7
74 changed files with 1374 additions and 863 deletions

View File

@@ -10,7 +10,12 @@ import 'package:provider/provider.dart';
class DocumentDownloadButton extends StatefulWidget {
final DocumentModel? document;
const DocumentDownloadButton({super.key, required this.document});
final bool enabled;
const DocumentDownloadButton({
super.key,
required this.document,
this.enabled = true,
});
@override
State<DocumentDownloadButton> createState() => _DocumentDownloadButtonState();
@@ -29,7 +34,7 @@ class _DocumentDownloadButtonState extends State<DocumentDownloadButton> {
width: 16,
)
: const Icon(Icons.download),
onPressed: Platform.isAndroid && widget.document != null
onPressed: Platform.isAndroid && widget.document != null && widget.enabled
? () => _onDownload(widget.document!)
: null,
).paddedOnly(right: 4);