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

Shimmer effect #230

Closed
wants to merge 3 commits into from
Closed

Conversation

yulieth9109
Copy link
Contributor

No description provided.

lib/widgets/map_overlay/shimmer.dart Outdated Show resolved Hide resolved
lib/widgets/map_overlay/shimmer.dart Outdated Show resolved Hide resolved
lib/widgets/map_overlay/shimmer.dart Outdated Show resolved Hide resolved
lib/widgets/map_overlay/shimmer.dart Outdated Show resolved Hide resolved
lib/widgets/map_overlay/shimmer.dart Outdated Show resolved Hide resolved
lib/widgets/map_overlay/shimmer.dart Outdated Show resolved Hide resolved
lib/widgets/map_overlay/shimmer.dart Outdated Show resolved Hide resolved
lib/widgets/map_overlay/shimmer.dart Outdated Show resolved Hide resolved

const Shimmer({
required this.isLoading,
required this.child,
Copy link
Member

Choose a reason for hiding this comment

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

You can supply a SizedBox.expand as the default value and therefore drop the necessity of passing

                      child: Container(
                        color: Colors.transparent,
                        width: MediaQuery.of(context).size.width, 
                        height: MediaQuery.of(context).size.height,
                      ),

Perhaps alternatively you can even make it nullable (and basically have null as default value) since ShaderMask doesn't require a child. You just need to make sure to use a Positioned.fill in the stack later. (this would be my preferred solution)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried both ways and the shimmer was not painting in any way, then I still left the container.

Comment on lines 145 to 155
IgnorePointer(
ignoring: true,
child: Shimmer(
isLoading: viewModel.isLoadingStopAreas,
child: Container(
color: Colors.transparent,
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
),
),
),
Copy link
Member

Choose a reason for hiding this comment

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

I think it makes sense to directly include the ignore pointer in the Shimmer widget.

Also please move this to the map_overlay.dart file making sure it is below the other overlay widgets like buttons and credits text.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left it in the home.dart because in the map_overlay.dart the shimmer does not cover the complete screen from left to right since it will be painted with a kind of border

@yulieth9109
Copy link
Contributor Author

Hi, the recordings are more than 10MB, I create a temporal link to share the videos with you to download

@Robbendebiene
Copy link
Member

Robbendebiene commented Jan 31, 2024

We are closing this PR in favor of #235

@yulieth9109 yulieth9109 deleted the shimmer_effect branch February 28, 2024 03:19
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.

2 participants