|
|
|
|
@ -2,6 +2,8 @@ import 'dart:io';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:test_sa/controllers/providers/api/device_transfer_provider.dart';
|
|
|
|
|
import 'package:test_sa/controllers/api_routes/urls.dart';
|
|
|
|
|
import 'package:test_sa/controllers/providers/api/asset_transfer_provider.dart';
|
|
|
|
|
import 'package:test_sa/controllers/providers/api/user_provider.dart';
|
|
|
|
|
import 'package:test_sa/extensions/context_extension.dart';
|
|
|
|
|
import 'package:test_sa/extensions/int_extensions.dart';
|
|
|
|
|
@ -9,7 +11,7 @@ import 'package:test_sa/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:test_sa/extensions/widget_extensions.dart';
|
|
|
|
|
import 'package:test_sa/models/device/device_transfer.dart';
|
|
|
|
|
import 'package:test_sa/views/pages/device_transfer/update_device_transfer.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/images/multi_image_picker.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/images/files_list.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/loaders/app_loading.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/loaders/loading_manager.dart';
|
|
|
|
|
import '../../../extensions/text_extensions.dart';
|
|
|
|
|
@ -109,7 +111,12 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> {
|
|
|
|
|
8.height,
|
|
|
|
|
_buildTextWidget(_model!.comment!),
|
|
|
|
|
],
|
|
|
|
|
attachmentWidget(),
|
|
|
|
|
if (_attachments.isNotEmpty) ...[
|
|
|
|
|
8.height,
|
|
|
|
|
const Divider().defaultStyle(context),
|
|
|
|
|
FilesList(images: _model?.assetTransferAttachments?.map((e) => URLs.getFileUrl(e.attachmentName ?? '') ?? '').toList() ?? []),
|
|
|
|
|
//attachmentWidget(),
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
@ -194,6 +201,29 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> {
|
|
|
|
|
],
|
|
|
|
|
):const SizedBox();
|
|
|
|
|
}
|
|
|
|
|
// Widget attachmentWidget() {
|
|
|
|
|
// _attachments.forEach((abc) {
|
|
|
|
|
// print(abc);
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// return Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// 8.height,
|
|
|
|
|
// if (_attachments.isNotEmpty) ...[
|
|
|
|
|
// const Divider().defaultStyle(context),
|
|
|
|
|
// context.translation.attachments.bodyText(context),
|
|
|
|
|
// 8.height,
|
|
|
|
|
// MultiFilesPicker(
|
|
|
|
|
// label: context.translation.attachments,
|
|
|
|
|
// files: _attachments,
|
|
|
|
|
// enabled: false,
|
|
|
|
|
// onlyImages: false,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ],
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
_buildTextWidget(String text) {
|
|
|
|
|
return text.bodyText(context);
|
|
|
|
|
|