Add share button selection option (#2730)

* Add share button selection option

* generated

* chore: switch to download icon

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ggurdin <ggurdin@gmail.com>
This commit is contained in:
Kelrap 2025-05-09 09:34:23 -04:00 committed by GitHub
parent ec22f44a49
commit db76cde11d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,7 @@ class OverlayHeader extends StatelessWidget {
final l10n = L10n.of(context);
final theme = Theme.of(context);
return Container(
padding: const EdgeInsets.symmetric(horizontal: 20),
padding: const EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(AppConfig.borderRadius),
@ -56,6 +56,16 @@ class OverlayHeader extends StatelessWidget {
onPressed: controller.copyEventsAction,
color: theme.colorScheme.primary,
),
if (controller.canSaveSelectedEvent)
// Use builder context to correctly position the share dialog on iPad
Builder(
builder: (context) => IconButton(
icon: const Icon(Symbols.download),
tooltip: L10n.of(context).download,
onPressed: () => controller.saveSelectedEvent(context),
color: theme.colorScheme.primary,
),
),
if (controller.canPinSelectedEvents)
IconButton(
icon: const Icon(Icons.push_pin_outlined),