Flutter UI Visual Noise and Distortion - flutter

As I test my Flutter app on a physical Android device the UI seems to accumulate visual noise/artifacts. The distortion usually starts on the very top of the notification bar and is barely noticeable. It then spreads to other parts of the screen, but the notification bar is the most affected. Restarting the device seems to help.
Any ideas on remediation?

Wrapping each page’s Scaffold in a SafeArea seems to solve the problem.

Related

Screen flickering and flashing continually when i navigate from one screen to another

Here is the video showing the problem:
https://streamable.com/ge4z0b
I have a Google Map screen, which shows a dialog on initialization and when you click the OK button of the dialog, you are redirected to the next screen, which has AR and camera implemented.
This happens only when i navigate from the Map Screen to AR screen. When i put AR screen as first screen, it doesnt flicker and works as it supposed to work.
Both screens are stateful and both are wrapped into Scaffolds.
Any idea why this happens?
I tried removing Scaffolds and a lot of suggestions from the community but nothing seems to work.
You can view the code here : https://codeshare.io/OdREVA
Screen flickering and flashing during navigation can be caused by a number of factors, including:
Performance issues: The cause of the screen flickering could be due to performance issues with the device or the app. If the app is not optimized or if the device is slow, it may cause the screen to flicker.
Stateful widgets: If you are using stateful widgets in your app, it may cause the screen to flicker if the state changes during navigation. Consider using stateless widgets instead.
Animations: If you are using animations in your app, it may cause the screen to flicker if the animation is not optimized or if it is too complex. Consider simplifying the animation or optimizing it for performance.
Flutter framework bugs: In some cases, the screen flickering issue could be caused by bugs in the Flutter framework itself. Consider filing a bug report with the Flutter team if you believe this to be the case.
Third-party plugins: If you are using third-party plugins in your app, it may cause the screen to flicker if the plugin is not optimized or if it is causing conflicts with other parts of the app. Consider disabling or removing the plugin to see if it resolves the issue.
It is difficult to determine the exact cause of the screen flickering without more information, such as the code and any related logs. Consider providing more information or filing a bug report with the Flutter team for a more accurate diagnosis

Flutter web renders elements on the screen too large

Flutter web seems to render the elements on the screen way too large. Everything, from text, to Containers, to form fields, is massive. It is like everything has been zoomed in. It doesn't look good. I thought setting the visual density of the theme to VisualDensity.compact or VisualDensity.adaptivePlatformDensity would fix it, but it doesn't seem to. Running the app on a very large iPad Pro does not enlarge the elements. Why might this enlargement happen? I work on another Flutter app that is not enlarged on web and am unsure of what the key difference is that is causing the different rendering behaviour.
This ended up being due to setting my mac display to "Scaled" with "larger text" in system preferences. It seemed to affect the web version and not the mobile simulators; I guess because the simulators are not under the mac display settings; they are their own device.
The fix was to set it to "Default for display":

How can I run my flutter app full stretched for Android Q gesture navigation?

Here you can see the clock app's ui is running behind the gesture. how can i implement this in flutter? I updated flutter to 2.5 but it's not working.
This is the first question I asked on stackoverflow and i couldn't quite get the question layout. sorry for this.
You have to use
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
in your main.dart before runApp.
As per the description of SystemUiMode.edgeToEdge:
Fullscreen display with status and navigation elements rendered over the
application.
Available starting at SDK 16 or Android J. Earlier versions of Android
will not be affected by this setting.
For applications running on iOS, the status bar and home indicator will be
visible.
The system overlays will not disappear or reappear in this mode as they
are permanently displayed on top of the application.

Unity Standalone App: Resolution Scaling Issue (OSX)

I have developed a Mac-OSX standalone app in Unity3D (Scale with Resolution: 1920x1080). Most of the time I present the app on my laptop, connected to an external screen, which works pretty well.
But when I'm on the road and use the app on my laptop screen (1440x900), the UI's are all over the place...
I know, BUT is there a way to run the app in a 16:9 ratio (with black bars on the top and bottom), the same as I can do it in the Unity3D editor?
I don't want to go back and re-scale everything to a lower resolution, as this would be a crazy job :(
Is there any solution without re-doing it?
Cheers
Thanks, but sadly this didn't work for me. The problem is my Reference Resolution in the Canvas Scaler is already set to 1920x1080. To fix this, I have to lower the reference, but this means re-doing all the UI's.
However, I found a workaround, which is strange but working. I have set the Default Screen Resolution in Unity to 1920x1080 as in the image/link below.
Now the strange part :)
1. Start the app with the option key on an HD screen and set the resolution to 1920x1080.
2. Save and Quit
3. Now the app is scaled down to 16:9 and keeps everything in place.
This works as long as you don't start this app or any other Unity build, with the option key on a lower resolution screen. In this case it will scale everything back again. You can redo the steps 1-3 and it will work again.
Not sure if there is another way to do this, but at least I have kind of a solution.
Default Screen Resolution in Unity to 1920x1080
There are two things you should check; 'Resolution and Presentation' under 'Player Settings', and canvas scalers. I have being in a situation similar to yours, I had built an iOS application meant for the vertical orientation, but also wanted to test it on macOS, the application launched correctly in fullscreen mode looking like this (The top status bar was intentionally brought down to show the aspect ratio):
Instead of using black bars on the sides, it seems like that Unity simply used the colour of the canvas of the current scene to fill in the gaps. This was my settings to get this result:
Only the 16:10 ratio (MacBook Pro) was checked, but the application functions in the iPhone's vertical ratio, I did not have to manually rescale the canvas,I simply switched the build platform, this was allowed by the canvas scalers I have added onto every canvas with the following setting (UI Scale mode: Scale with screen size | Screen match mode: expand), this would allow the canvas to expand automatically and scale to any aspect ratio, without messing up the UI:
Hope this Helps!

Device Toolbar - Responsive View

Version 65.0.3325.146 (Official Build) (64-bit)
Going into responsive mode seems to keep desktop view and crop the screen.
All of the preset phone dimensions don't work, but a custom one seems to fix it.
Is this a bug or is there a resolution?
Video of issue: https://streamable.com/oe5in
Same here. Setting the size manually worked (like, creating a new device with the same size as another prebuilt one), but its not really optimal. I wonder if this has something to do with device pixel density.
But it should not happen at responsive mode. :(
Looks like it's an official bug, issue has been reported to Google here: https://bugs.chromium.org/p/chromium/issues/detail?id=819489#c47