Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue#42 #1155

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Issue#42 #1155

wants to merge 3 commits into from

Conversation

lakshya1goel
Copy link

@lakshya1goel lakshya1goel commented Dec 13, 2024

This PR enhances the bottom app bar in the by adding a download button alongside the existing copy link button. The download button allows users to save the displayed image to local storage, offering a familiar and seamless experience consistent with platform norms.

Related Issue: #42

Key Changes:

Download Button Added:
A new IconButton with a download icon (Icons.download_rounded) is added to the bottom app bar.

Download Functionality:
When pressed, the button initiates a network request to download the image.
The image is saved to the local storage in the "Downloads" directory.

User Feedback:
A SnackBar is displayed to inform the user about the download status:
Success: "Image downloaded successfully."
Failure: "Failed to download image."
Timeout: "Download timed out."

Testing:
Comprehensive tests are added to verify the behavior of the download button:
Displays download button correctly.
Handles successful downloads.
Handles failed downloads (e.g., 404 errors).
Handles timeout scenarios gracefully.

Before After
Before After

Video Demonstration:

WhatsApp.Video.2024-12-13.at.7.21.34.PM.mp4

@whilstsomebody
Copy link

There are some issues in the PR @lakshya1goel .

  • Clean your commit history.
  • Write clearer commit messages following the commit guidelines.

Please fix these. Thanks!

@PIG208
Copy link
Member

PIG208 commented Dec 17, 2024

I agree with @whilstsomebody's commit. To add, please walkthrough https://github.com/zulip/zulip-flutter?tab=readme-ov-file#submitting-a-pull-request when working on your next update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants