Comments (5)
Hi~ @iamfirdous Thank you for your time. π
Maybe the problem is that the web renderer is HTML
.
It looks like your web renderer is using the default configuration:
renderer: auto
auto (default) - automatically chooses which renderer to use. This option chooses the HTML renderer when the app is running in a mobile browser, and CanvasKit renderer when the app is running in a desktop browser.
So mobile will use HTML.
Please try CanvasKit
to see if this problem still occurs.
You can configure it in web/index.html
as follows:
......
<script>
window.addEventListener('load', function(ev) {
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function(engineInitializer) {
// here
let config = {
renderer: "canvaskit",
};
engineInitializer.initializeEngine(config).then(function(appRunner) {
appRunner.runApp();
......
});
}
});
});
</script>
......
And build the web like this:
$ flutter build web --web-renderer canvaskit --release
from flutter_tilt.
@iamfirdous
The Tilt widget relies heavily on Transform for some of its effects.
Unfortunately, Flutter's web platform has some weird rendering issues, whether it's CanvasKit or HTML (especially when using transform and canvas related widgets). π
I also reported an issue to Flutter about the Tilt widget turning black in HTML: flutter/flutter#147129.
CanvasKit was chosen because it provides the most consistent rendering possible and reduces the risk of inconsistent rendering across browsers.
CanvasKit: This renderer is fully consistent with Flutter mobile and desktop, has faster performance with higher widget density, but adds about 1.5MB in download size. CanvasKit uses WebGL to render Skia paint commands.
from flutter_tilt.
@AmosHuKe
Thank you for the detailed clarification of the Tilt widget issue on mobile browsers. I also greatly appreciate your effort in raising the issue on Flutter GitHub. Your insights are invaluable for understanding the problem. I'm looking forward to seeing how it can be resolved to improve cross-platform usability. Since the issue is resolved for me, I'll go ahead and close it.
from flutter_tilt.
@iamfirdous
Thanks again for your feedback and time!
from flutter_tilt.
@AmosHuKe That made a huge difference. I assume your package is designed to work with canvaskit on the web. Could you elaborate on the differences between the canvaskit and HTML renderers? One observation I made while using canvaskit is a slight jitter during the initial page scroll. Nevertheless, thanks a lot for your assistance.
from flutter_tilt.
Related Issues (10)
- [Feature] ε―δ»₯ε’ε ιεζεΊηζ¬ηεοΌSensors HOT 1
- Tilt & Hold Position? Or Tilt to Pan? HOT 5
- Tapping Moves Entire Content HOT 4
- After use, the mobile phone fever is serious, please check what is the reason HOT 4
- What is the reason for the rapid heating of the mobile phone after use? HOT 2
- This prompt appears on iOS HOT 2
- [Feature] Disable Features on Low Power Mode HOT 1
- [Feature request] Need to set tilt programmatically. HOT 2
- [Feature request] Ability to have light and shadow for png images with transparent layers. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_tilt.