HyM attachments resolve: #2 #3

Merged
Juan merged 15 commits from login into main 2025-04-24 16:52:58 +00:00
Showing only changes of commit c09f4e7a11 - Show all commits

View File

@ -1,5 +1,6 @@
import "dart:typed_data";
import "package:crab_ui/attachmentDownload.dart";
import "package:crab_ui/structs.dart";
import "package:flutter/material.dart";
import 'package:pdfrx/pdfrx.dart';
@ -27,11 +28,42 @@ class AttachmentWidget extends StatelessWidget {
));
}
return Center(
child: Text(
"Attachment not supported for preview, you'll need to download",
style: TextStyle(
color: Colors.black, fontSize: 20, decoration: TextDecoration.none),
));
child: Container(
padding: EdgeInsets.all(20),
decoration: BoxDecoration(
color: Color(0xff6C63FF),
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black26,
blurRadius: 10,
),
],
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
"No preview available",
style: TextStyle(
color: Colors.white, fontSize: 18, decoration: TextDecoration.none),
),
SizedBox(
height: 5,
),
GestureDetector(
child: ElevatedButton(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text("Download", style: TextStyle(color: Color(0xff2c3e50)),),
Icon(Icons.download,
color: Color(0xffb0b0b0),),
]),
onPressed: () => Attachmentdownload().saveFile(att),
)),
]),
));
}
@override