Attachments handled in transactions list mowadhafi
							parent
							
								
									b9fcf399c4
								
							
						
					
					
						commit
						fc3c1c057a
					
				| @ -0,0 +1,52 @@ | ||||
| class GetTransactionAttachmentModel { | ||||
|   int? attachmentId; | ||||
|   String? fileName; | ||||
|   String? contentType; | ||||
|   dynamic attachFileStream; | ||||
|   String? base64String; | ||||
|   dynamic isActive; | ||||
|   dynamic referenceItemId; | ||||
|   dynamic content; | ||||
|   dynamic filePath; | ||||
|   int? languageId; | ||||
| 
 | ||||
|   GetTransactionAttachmentModel( | ||||
|       {this.attachmentId, | ||||
|         this.fileName, | ||||
|         this.contentType, | ||||
|         this.attachFileStream, | ||||
|         this.base64String, | ||||
|         this.isActive, | ||||
|         this.referenceItemId, | ||||
|         this.content, | ||||
|         this.filePath, | ||||
|         this.languageId}); | ||||
| 
 | ||||
|   GetTransactionAttachmentModel.fromJson(Map<String, dynamic> json) { | ||||
|     attachmentId = json['attachmentId']; | ||||
|     fileName = json['fileName']; | ||||
|     contentType = json['contentType']; | ||||
|     attachFileStream = json['attachFileStream']; | ||||
|     base64String = json['base64String']; | ||||
|     isActive = json['isActive']; | ||||
|     referenceItemId = json['referenceItemId']; | ||||
|     content = json['content']; | ||||
|     filePath = json['filePath']; | ||||
|     languageId = json['languageId']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     Map<String, dynamic> data = Map<String, dynamic>(); | ||||
|     data['attachmentId'] = this.attachmentId; | ||||
|     data['fileName'] = this.fileName; | ||||
|     data['contentType'] = this.contentType; | ||||
|     data['attachFileStream'] = this.attachFileStream; | ||||
|     data['base64String'] = this.base64String; | ||||
|     data['isActive'] = this.isActive; | ||||
|     data['referenceItemId'] = this.referenceItemId; | ||||
|     data['content'] = this.content; | ||||
|     data['filePath'] = this.filePath; | ||||
|     data['languageId'] = this.languageId; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,34 @@ | ||||
| import 'dart:io'; | ||||
| 
 | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | ||||
| 
 | ||||
| class ViewTransactionAttachment extends StatelessWidget { | ||||
|   final File imageFile; | ||||
| 
 | ||||
|   const ViewTransactionAttachment({Key? key, required this.imageFile}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Scaffold( | ||||
|       backgroundColor: Colors.white, | ||||
|       appBar: AppBarWidget( | ||||
|         context, | ||||
|         title: LocaleKeys.mowadhafhiRequest.tr(), | ||||
|       ), | ||||
|       body: SingleChildScrollView( | ||||
|         child: Column( | ||||
|           crossAxisAlignment: CrossAxisAlignment.center, | ||||
|           mainAxisAlignment: MainAxisAlignment.center, | ||||
|           children: [ | ||||
|             Image.file(imageFile), | ||||
|             50.height, | ||||
|           ], | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
					Loading…
					
					
				
		Reference in New Issue