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

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.

Related

Animated splash screen for Android & iOS

To make an animation which can be used as splash screen for Android & iOS, I was thinking about using lotties (explained in this tutorial), but with Android 12 it seems like the tools used are deprecated and it's not really a good solution anymore.
I found this workaround to still make it work, but from what I understand, the splash screen is now waiting for the animation to finish, which I know is a bad practice and I don't really want to do that (maybe there is a way to interrupt it?).
I have seen some packages on pub.dev, but the animated ones seem to not really replace the launch screen (the white screen by default) and just start after it.
So my question is : is there any other way to create one animation which can be used both on Android & iOS? (which would be a looping animation, interrupted when the app is ready).

Flutter Native SplashScreens Background processes

I have created SplashScreens for my Flutter app for both iOS and Android using the native way which is editing the LaunchScreen.storyboard and it is working currently when I run my app but the SplashScreen does not hold long enough and is there a way to programmatically hide the native splashscreen in dart after I am done with some data processing and logic?
The solutions I found online are all flutter apps with SplashScreen that is build using flutter widgets and not the native way...
Even if you build the splash screen if Flutter, you still need to set one in via XCode. Otherwise, the app loads with a momentary plan white screen and Apple rejects it.
If you want to extend the time till the moment data process is over, then you will have to make a replica of LaunchScreen.storyboard in Flutter. The data processing and logic are written in Flutter. There's no way it can tell LaunchScreen.storyboard "I am done". What you can do is though, make a splash screen in Flutter which will look like LaunchScreen.storyboard. And once the data processing is done, you can navigate the user to the desired screen. Since the two screens are same, use won't see the difference and the app will smoothly show the next screen.
Just a word of caution - be careful about extending the timing of launch screen. Apple may reject the app. See if something can be done after the screen load. You can use flutter after layout package for this or the below line will do the trick :
WidgetsBinding.instance
.addPostFrameCallback((_) => myFunction(context));
This thread may help you to delay the screen for XX seconds.

Run flutter application into iOS virtual device on virtualized OSX

I have some performance problems running my Flutter application inside iOS simulator installed inside a VirtualBox OSx machine. The simulator run and the application is deployed without any problem. But there is lag when the screen has to be redrawn. For example, when I click on a button which opens a modal sheet, the image is stuck, I can unlock it simply dragging the IOs bottom bar of a few pixels. It's difficult to test the application since every time I have to move that bar a few pixels in order to update the phone image. This is an example of my problem:
As you can see the image is redrawn just after I click and move the iOS bottom bar.
Here a simulation of a native iOS app:
Here as you can see the screen has to redraw, I don't need to move the bottom bar.
Any suggestion?

How can I fix the delay of flutter app during launch?

When I run flutter app it delays for few seconds shows just white screen and then the main page is shown. How can i fix it
There is an entry in the docs about the launch screen.
https://flutter.io/docs/development/ui/assets-and-images#updating-the-launch-screen
Basically you can provide an image to be shown while flutter loads. The framework is not ready at that point though, so this is done on the platform side.

odd Ionic behavior in iOS simulator

AN Ionic application am a working on is having some odd behavior when run in the iOS simulator (Xcode 7.2.1). My login screen when normally run looks like:
When editing the username field however, I see some sort of toolbar popup at the bottom:
Worse then that however is when I go over to the password field:
I thought at first that this may deal with the native WebView, but it only happens in the simulator. Not when run on the actual device or through ionic serve. Any ideas what is going on here? Why this odd behavior?
EDIT
Also, the app launches with the default Cordova splash screen even though I have set a splash with Ionic. Even so, it should be showing the Ionic splash as opposed to the Cordova one.
EDIT #2
Many times, the Cordova status bar fails to work and my status bar is black as opposed to white.
While this looks weird for you in iOS Simulator, and for me in Chrome's device emulator devtool, it's 'desired behaviour' in Ionic.
Ionic is designed with mobile focus in mind, so when emulating a mobile device, they hide elements to simulate the native keyboard.
Ionic wrote a blog post about this, in fact:
Getting the keyboard to play nicely with the web layer was challenging for several reasons. Probably the biggest issue is the variation in behavior across devices and platforms when the keyboard is shown.
In iOS, not only does the web view resize differently when the keyboard shows in versions 6.1, 7.0, and 7.1, but it is affected differently, and sometimes completely oppositely, by including or excluding the viewport meta tag. Throw support for tablets and landscape orientation into the mix and trying to make every scenario on every device work nicely can have you quickly creating three new issues for every one you fix.
The blog post goes on to say they wrote a Keyboard plugin for Cordova, which is supposed to perform keyboard related hiding and element changing as faster and more accurately. You can find that GitHub repo here.