-
Notifications
You must be signed in to change notification settings - Fork 205
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
[BUG] Shimmer is being cut after resize window WEB #61
Comments
Found out that inserting Shimmer.fromColors in AnimatedSwitcher and switching fast between shimmer and correct child creates that container - looks like shimmer can't handle fast switching? EDIT: Also the bigger screen resolution the container is bigger. It doesn't appear on low res screens. EDIT2: Problem occurs also when we will refresh page and increase window size. Than container appears - after refreshing again on increased window problem dissapears until we will increase size again -.-" EDIT3: Forgot to say that its HTML engine. Repro: TwSkeletonWrapperclass TwSkeletonWrapper extends StatelessWidget {
const TwSkeletonWrapper({required this.child, Key? key}) : super(key: key);
final Widget child;
@override
Widget build(BuildContext context) {
return Shimmer.fromColors(
key: ValueKey(child.hashCode),
baseColor: Colors.black, // Colros simplified for testing
highlightColor: Colors.white,
child: child,
);
}
}
And wrap TwSkeletonWrapper inside: TwSkeletonclass TwSkeleton extends StatelessWidget {
const TwSkeleton({
required this.skeleton,
required this.loading,
required this.child,
Key? key,
}) : super(key: key);
final Widget skeleton;
final Widget child;
final bool loading;
@override
Widget build(BuildContext context) {
return AnimatedSwitcher(
duration: loading ? const Duration(milliseconds: 650) : Duration.zero,
reverseDuration:
loading ? const Duration(milliseconds: 10) : Duration.zero,
child: loading ? skeleton : child,
);
}
}
|
I've recorded sample of how to reproduce it. After entering page is enough to just increase size window to be able to see it. |
+1 |
Hi. Thanks for plugin.
Shimmer.fromColors creates white space on the right side.
It never happened before. Now it does after migrating flutter to 3.3.0 and later.
Bug occurs on Flutter 3.3.0 & 3.3.2
Chrome setup
Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.125
Removing
Shimmer.fromColors
resolve problem.Image of skeletons with Shimmer.fromColors:
Image of skeletons without Shimmer.fromColors:
Flutter doctor
The text was updated successfully, but these errors were encountered: