I have to make different splash screen with different image, but this image is currently on native folder. This project is consists a python file code that functioning to run different MainPage, so when I build debug, it will make different app logo (from image inside native folder) based on what main page that I want to run. How to make different splash screen with image that same as app logo, does it need to be done with different programming language like python or XML file in android or is it possible to be done in flutter only?
You can use Flavors and Schemas for it.
https://docs.flutter.dev/deployment/flavors\
https://itnext.io/flutter-new-app-setup-with-flavors-in-one-go-331471b127e3
Related
I came to ask for help because I want to do a native splash screen type in my flutter application. So I want that when I launch my application, I have a page with the logo of my application, a descriptive text, the version number of the application and a loader.
After a lot of research I cannot find satisfactory tutorials. Either there are native splash screens that change the base color when the app is launched and we can just display a logo. Either we create a fake splash screen which is a start page but which is launched after the native start. I don't know if I'm clear ... Voila, but how can we all do it at the same time?
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.
I would like to create an app, that works as a framework for using e.g. the ipad.
That means, that you will start the app and continue working normally with it, while suddenly e.g. animals cross the screen.
Hence the app should create a transparent canvas on top of the ipad user interface where all animations can be played.
Do packages for that exist?
Unfortunately, what you're asking for isn't currently supported in flutter. The closest you can get is notifications at the moment using a package like this
I'm assuming you want to make something along the lines of this goose desktop application for windows. Your best bet in this situation is to go native and maybe even make your own dart package.
For example I can generate different drawable in android. In the same way how to generate the images in Ionic for both android and IOS. Ionic document is only mentioned with generating ICON and SPLASH SCREEN. How can I add other local images In the same way
Other images can just be placed in the www folder, they will be resized by the webview component where the app runs in.
I have developed a straight iPhone/iPod Touch app.
A launch image is implemented for Retina displays as well as the lower resolution of the former generation devices.
Those images are displayed properly on the iPhone simulator as well as on several iPhone an iPod Touch devices.
However, since some days, when launched on an iPad (1) or iPad simulator one of the other images within the app is shown.
Apparently the image that is displayed wrongly, is one of two amongst ca. 70 images within the app. Those two images happen to be either
1. the first image in my xcode project groups hierarchy.
-or-
2. the first image in my project in alphabetical order.
I did not yet find a pattern of when 1. or 2. happens, so when the first image in the project's hierarchy of groups is taken or when the first in alphabetical order is taken. But it seems to be one of these two files only.
Any idea what I probably did wrong so that a wrong image is picked as launch image of this iPhone-only app whenever it is launched on an iPad?
Thanks in advance.
Cheers
Hermann
Try inserting an image named Default.png into Xcode. That's all, just drag it in. Xcode recognizes any picture named Default.png as the loading image. That should make it work.
To expand a little on Jack's answer - you can indeed use an image named Default.png which will automatically be used as a launch image for your app.
However,you can also customise the launch image for particular hardware and device orientations by using images of a particular size and name - for example, a 768x1004 pixel image named Default-Portrait~ipad.png added to your project will be automatically used as the launch image when you launch the app on an iPad in portrait orientation.
The use of these customised images is highly recommended, as it allows the launch image to be sized appropriately for the different shapes of screen (i.e. iPhone and iPad), and allows high resolution launch images to be used on Retina display devices.
For a list of these sizes and image names, see this page. The items of interest are the ones beginning with "Default"
All iPhone apps have a splash screen, or what Apple refers to as a “launch image”. It is the screen that is displayed immediately after you press your app’s icon on the home screen, while the app icons are sweeping away and your app is zooming into view.
Some apps opt not to display a splash screen and go for a black screen, which is the default behaviour when you create an app. Others display a wireframe of the app’s interface in order to look like it is loading faster. See Apple’s native apps such as Clock and Camera for good examples of this. The most common use of the splash screen (especially in games) is to present a company or game logo, as we do in Addicus:
Apple has made it so easy to set your splash screen that you don’t even need a single line of code to do it. Why, you don’t even need to change a setting. Here’s how to set your splash screen it in just 2 steps:
Add a file to your project’s Resource folder called Default.png.
There is no step 2. Take this time to reflect on how good life is.
And that’s it. Run your app and your splash screen will zoom into glorious view.
A couple of things to watch out for when working with splash screens:
Whatever image you give it will be scaled to fill the 320×480 resolution of the iPhone, so ideally you would use a 320×480-sized image.
If your iPhone app is running in landscape mode, you need to rotate the splash screen you use. For example, our splash screen is rotated 90 degrees to the right in the above image.
See more at: http://getsetgames.com/tag/launch-image/#sthash.GEXwuzsf.dpuf