HyM attachments resolve: #2 #3
					 2 changed files with 50 additions and 50 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
import 'package:crab_ui/api_service.dart';
 | 
			
		||||
import 'package:crab_ui/attachmentDownload.dart';
 | 
			
		||||
import 'package:crab_ui/structs.dart';
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
import 'package:pointer_interceptor/pointer_interceptor.dart';
 | 
			
		||||
| 
						 | 
				
			
			@ -294,9 +295,14 @@ class AugmentClasses {
 | 
			
		|||
  static List<Widget> _buildMenuItem(BuildContext context) {
 | 
			
		||||
    List<Widget> listOfFiles = [];
 | 
			
		||||
    for (AttachmentResponse file in ApiService.threadAttachments) {
 | 
			
		||||
      listOfFiles.add(ListTile(
 | 
			
		||||
      listOfFiles.add(
 | 
			
		||||
        ListTile (
 | 
			
		||||
          leading: Icon(Icons.file_present),
 | 
			
		||||
          title: Text(file.name.toString()),
 | 
			
		||||
          trailing: GestureDetector( 
 | 
			
		||||
            child: Icon(Icons.download),
 | 
			
		||||
            onTap: () => Attachmentdownload().saveFile(file),
 | 
			
		||||
          ),
 | 
			
		||||
          onTap: () {
 | 
			
		||||
            _overlayEntry?.remove();
 | 
			
		||||
            Navigator.push(
 | 
			
		||||
| 
						 | 
				
			
			@ -304,13 +310,6 @@ class AugmentClasses {
 | 
			
		|||
                MaterialPageRoute(
 | 
			
		||||
                    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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,6 +19,7 @@ dependencies:
 | 
			
		|||
  pointycastle: ^3.4.0
 | 
			
		||||
  mime: ^1.0.3
 | 
			
		||||
  pointer_interceptor: ^0.10.1+2
 | 
			
		||||
  file_saver: ^0.2.14
 | 
			
		||||
 | 
			
		||||
  english_words: ^4.0.0
 | 
			
		||||
  provider: ^6.0.0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue