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

51 lines
1.3 KiB
Dart
Raw 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';
import '../../../utils/alerts.dart';
class SingleAttachment extends StatelessWidget {
final Function()? onpressed;
final Attachment attachment;
const SingleAttachment({
required this.attachment,
required this.onpressed,
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-07 06:33:38 +00:00
AutoSizeText(
attachment.filename!,
2023-08-07 06:33:38 +00:00
wrapWords: false,
maxLines: 1,
),
),
const SizedBox(
width:
8,
),
GestureDetector(
onTap:onpressed,
child: const Icon(Icons.delete,color: primary,))
],
));
}
}