-
Notifications
You must be signed in to change notification settings - Fork 14
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
Shimmer effect #230
Conversation
lib/widgets/map_overlay/shimmer.dart
Outdated
|
||
const Shimmer({ | ||
required this.isLoading, | ||
required this.child, |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
lib/screens/home.dart
Outdated
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, | ||
), | ||
), | ||
), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
6fb4ed4
to
b8de78a
Compare
Hi, the recordings are more than 10MB, I create a temporal link to share the videos with you to download |
772ae35
to
a5cfc90
Compare
We are closing this PR in favor of #235 |
No description provided.