passo_mobile_app/lib/screens/profile/shared/single_attachment.dart

54 lines
1.4 KiB
Dart
Raw Permalink Normal View History

2023-08-07 06:33:38 +00:00
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../model/profile/attachment.dart';
import '../../../theme-data.dart/box_shadow.dart';
import '../../../theme-data.dart/colors.dart';
class SingleAttachment extends StatelessWidget {
final Function()? onpressed;
final Attachment attachment;
2023-08-27 08:38:05 +00:00
final Function()? view;
const SingleAttachment({
required this.attachment,
required this.onpressed,
2023-08-27 08:38:05 +00:00
required this.view,
super.key,
});
@override
Widget build(BuildContext context) {
return Container(
padding:
const EdgeInsets.all(
5),
decoration: box1().copyWith(
color: Colors
.grey
.shade300,
boxShadow: []),
child:
Row(
children: [
Expanded(
child:
2023-08-27 08:38:05 +00:00
GestureDetector(
onTap: view,
child: Text(
2023-08-27 08:38:05 +00:00
attachment.filename!,
2023-08-27 08:38:05 +00:00
maxLines: 1,
),
),
),
const SizedBox(
width:
8,
),
GestureDetector(
onTap:onpressed,
child: const Icon(Icons.delete,color: primary,))
],
));
}
}