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

Loading State for camera overlay capture #1918

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

Conversation

Umair-Manzoor-47
Copy link
Contributor

Github Ticket: #1913
While processing image to crop for overlay Widget Camera goes into loading state.
So application doesn't seems like stuck.

cameraLoading.mp4

@Umair-Manzoor-47 Umair-Manzoor-47 linked an issue Mar 12, 2025 that may be closed by this pull request
Comment on lines +520 to +521
child: CircularProgressIndicator(
color: Colors.white, // Optional: Change the color of the progress indicator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we allow user to build his own loading indicator? if loading widget is not defined we can use this as default, but user should have the option to define his own widget for customization

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we can have custom widget.

Comment on lines +1042 to +1052
setState(() {
isCropping = true;
});
try {
file = await takeOverlayCapture();
} on Exception catch (e) {
print(e);
} finally {
setState(() {
isCropping = false;
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on the video in PR, this is taking too much time, is there a way to optimize this? maybe doing a something in background, please checkout why its taking that much time, we can push this for now, but there should be way to optimize take

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually there's image encoding decoding going on there and also file reading too

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.

Camera loading State
2 participants