HyM attachments resolve: #2 #3
@ -1,4 +1,5 @@
|
|||||||
import 'package:crab_ui/api_service.dart';
|
import 'package:crab_ui/api_service.dart';
|
||||||
|
import 'package:crab_ui/attachmentDownload.dart';
|
||||||
import 'package:crab_ui/structs.dart';
|
import 'package:crab_ui/structs.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
||||||
@ -294,9 +295,14 @@ class AugmentClasses {
|
|||||||
static List<Widget> _buildMenuItem(BuildContext context) {
|
static List<Widget> _buildMenuItem(BuildContext context) {
|
||||||
List<Widget> listOfFiles = [];
|
List<Widget> listOfFiles = [];
|
||||||
for (AttachmentResponse file in ApiService.threadAttachments) {
|
for (AttachmentResponse file in ApiService.threadAttachments) {
|
||||||
listOfFiles.add(ListTile(
|
listOfFiles.add(
|
||||||
|
ListTile (
|
||||||
leading: Icon(Icons.file_present),
|
leading: Icon(Icons.file_present),
|
||||||
title: Text(file.name.toString()),
|
title: Text(file.name.toString()),
|
||||||
|
trailing: GestureDetector(
|
||||||
|
child: Icon(Icons.download),
|
||||||
|
onTap: () => Attachmentdownload().saveFile(file),
|
||||||
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_overlayEntry?.remove();
|
_overlayEntry?.remove();
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
@ -304,13 +310,6 @@ class AugmentClasses {
|
|||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => AttachmentWidget(attachment: file)));
|
builder: (context) => AttachmentWidget(attachment: file)));
|
||||||
|
|
||||||
// openAtta
|
|
||||||
|
|
||||||
// Image attachment = Image.memory(file.data);
|
|
||||||
|
|
||||||
// print("rick rolled");
|
|
||||||
// html.window
|
|
||||||
// .open("https://www.youtube.com/watch?v=xvFZjo5PgG0", "testing");
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
return listOfFiles;
|
return listOfFiles;
|
||||||
|
@ -19,6 +19,7 @@ dependencies:
|
|||||||
pointycastle: ^3.4.0
|
pointycastle: ^3.4.0
|
||||||
mime: ^1.0.3
|
mime: ^1.0.3
|
||||||
pointer_interceptor: ^0.10.1+2
|
pointer_interceptor: ^0.10.1+2
|
||||||
|
file_saver: ^0.2.14
|
||||||
|
|
||||||
english_words: ^4.0.0
|
english_words: ^4.0.0
|
||||||
provider: ^6.0.0
|
provider: ^6.0.0
|
||||||
|
Loading…
Reference in New Issue
Block a user