hnvn / flutter_shimmer

A package provides an easy way to add shimmer effect in Flutter project
BSD 3-Clause "New" or "Revised" License
1.77k stars 200 forks source link

Shimmed items on web are rendered differently compared to mobile #44

Open vanelizarov opened 3 years ago

vanelizarov commented 3 years ago

I'm currently working on adding web support to mobile app and figured out that some shimmed items are rendered differently on web and mobile.

Here is the example for one of the screens: Mobile (iOS):

Web:

Screen Shot 2021-03-29 at 14 46 03

The screen is constructed via CustomScrollView. As you can see there's a strange offset in cards on web (top and left is twice greater than bottom and right) and two rects on top are not visible (they appear only on scroll):

https://user-images.githubusercontent.com/5096148/112831718-069ab700-909d-11eb-9827-886d0ee1cb84.mov

flutter doctor -v ``` [✓] Flutter (Channel dev, 2.1.0-12.1.pre, on macOS 11.3 20E5217a darwin-x64, locale en-US) • Flutter version 2.1.0-12.1.pre at /Users/vanelizarov/flutter • Framework revision 8264cb3e8a (3 weeks ago), 2021-03-10 12:37:57 -0800 • Engine revision 711ab3fda0 • Dart version 2.13.0 (build 2.13.0-116.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Users/vanelizarov/Library/Android/sdk • Platform android-30, build-tools 29.0.2 • ANDROID_HOME = /Users/vanelizarov/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e • CocoaPods version 1.10.1 [✓] Chrome - develop for the web • CHROME_EXECUTABLE = /Users/vanelizarov/Documents/dev/torg/flutter_web/chrome.sh [✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 50.0.1 • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] VS Code (version 1.54.3) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.20.0 [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-x64 • macOS 11.3 20E5217a darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.40 beta • No issues found! ```