Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
gnunicorn committed Aug 14, 2024
1 parent 79071c5 commit 693c13f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 37 deletions.
9 changes: 6 additions & 3 deletions app/lib/features/attachments/widgets/attachment_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ class AttachmentItem extends ConsumerWidget {
: IconButton(
onPressed: () => ref
.read(
attachmentMediaStateProvider(attachment).notifier)
attachmentMediaStateProvider(attachment).notifier,
)
.downloadMedia(),
icon: Icon(
Icons.download,
Expand All @@ -79,8 +80,10 @@ class AttachmentItem extends ConsumerWidget {
.areYouSureYouWantToRemoveAttachmentFromPin,
isSpace: true,
),
icon: Icon(Icons.delete_forever,
color: Theme.of(context).colorScheme.error),
icon: Icon(
Icons.delete_forever,
color: Theme.of(context).colorScheme.error,
),
),
],
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,46 +30,49 @@ class AttachmentSelectionOptions extends StatelessWidget {
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
children: [
Wrap(alignment: WrapAlignment.center, children: [
if (onLinkSelected != null)
Wrap(
alignment: WrapAlignment.center,
children: [
if (onLinkSelected != null)
_attachmentOptionItem(
context: context,
title: L10n.of(context).link,
iconData: Atlas.link,
onTap: () => onTapLink(context),
),
if (!isDesktop)
_attachmentOptionItem(
context: context,
title: L10n.of(context).camera,
iconData: Atlas.camera,
onTap: () => onTapCamera(context),
),
_attachmentOptionItem(
context: context,
title: L10n.of(context).link,
iconData: Atlas.link,
onTap: () => onTapLink(context),
title: L10n.of(context).image,
iconData: Atlas.file_image,
onTap: () => onTapImage(context),
),
if (!isDesktop)
_attachmentOptionItem(
context: context,
title: L10n.of(context).camera,
iconData: Atlas.camera,
onTap: () => onTapCamera(context),
title: L10n.of(context).video,
iconData: Atlas.file_video,
onTap: () => onTapVideo(context),
),
_attachmentOptionItem(
context: context,
title: L10n.of(context).image,
iconData: Atlas.file_image,
onTap: () => onTapImage(context),
),
_attachmentOptionItem(
context: context,
title: L10n.of(context).video,
iconData: Atlas.file_video,
onTap: () => onTapVideo(context),
),
_attachmentOptionItem(
context: context,
title: L10n.of(context).audio,
iconData: Atlas.audio_headphones,
onTap: () => onTapAudio(context),
),
_attachmentOptionItem(
context: context,
title: L10n.of(context).file,
iconData: Atlas.file,
onTap: () => onTapFile(context),
),
]),
_attachmentOptionItem(
context: context,
title: L10n.of(context).audio,
iconData: Atlas.audio_headphones,
onTap: () => onTapAudio(context),
),
_attachmentOptionItem(
context: context,
title: L10n.of(context).file,
iconData: Atlas.file,
onTap: () => onTapFile(context),
),
],
),
],
);
}
Expand Down

0 comments on commit 693c13f

Please sign in to comment.