सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
एक फ्लटर पैकेज जो एंड्रॉइड और आईओएस पर स्प्लैश स्क्रीन को नियंत्रित करने के लिए एक प्रोग्रामेटिक एपीआई प्रदान करता है। यह विकासकर्ताओं को ऐप स्टार्टअप के दौरान स्प्लैश स्क्रीन को डायनामिक रूप से दिखाने और छिपाने की अनुमति देता है, जिससे स्मूथ ट्रांज़िशन और कस्टम स्प्लैश लॉजिक संभव होता है। पैकेज मूल ब्लॉक के साथ बिल्कुल एकीकृत है और आईओएस और एंड्रॉइड दोनों का समर्थन करता है बिना किसी अतिरिक्त कॉन्फ़िगरेशन के। यह ऐप्स के लिए आदर्श है जिन्हें देरी से स्प्लैश दिखाने या ऐप स्टेट के आधार पर शर्त के आधार पर स्प्लैश हैंडलिंग की आवश्यकता होती है।
उपयोग
डायनामिक स्प्लैश कंट्रोल
एप्लिकेशन पहली अभियान देरी
शर्त के आधार पर स्प्लैश प्रदर्शन
ऑनबोर्डिंग इंटीग्रेशन
कस्टम स्प्लैश ट्रांज़िशन
लॉगिन के बाद स्प्लैश प्रबंधन
मुख्य विशेषताएँ
प्रोग्रामेटिक शो/हाइड
Android और iOS समर्थन
न्यूनतम सेटअप
मूल आधार प्लेटफॉर्म एकीकरण
अतिरिक्त कॉन्फ़िगरेशन की आवश्यकता नहीं है
स्मूथ ट्रांजिशन हैंडलिंग
इनके लिए उपयुक्त
ऑनबोर्डिंग प्रवाह वाले ऐप्स
देरी से स्प्लैश वाले ऐप्स
डेवलपर्स स्प्लैश टाइमिंग का प्रबंधन कर रहे हैं
क्रॉस-प्लेटफ़ॉर्म स्प्लैश की आवश्यकता है
जटिल स्टार्टअप तरीके वाले ऐप्स
विचार योग्य बातें
पूर्ण कार्यक्षमता के लिए मूल वेब प्लेटफॉर्म सेटअप की आवश्यकता होती है
स्प्लैश स्क्रीन तक सीमित
जटिल UI ओवरले के लिए उपयुक्त नहीं
कस्टम डिज़ाइन के लिए अतिरिक्त स्टाइलिंग की आवश्यकता हो सकती है
सही पहले क्रम के निर्भर करता है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
flutter_splash_screen
A splash screen API for flutter which can programatically hide and show the splash screen. Works on
Android and iOS.
Update the MainActivity.kt to use flutter_splash_screen via the following changes:
package org.devio.flutter.splashscreen.example
import android.os.Bundle
import io.flutter.embedding.android.FlutterActivity
import org.devio.flutter.splashscreen.SplashScreen // add
class MainActivity : FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
// SplashScreen.show(this)
// or enable full screen
SplashScreen.show(this, true)
super.onCreate(savedInstanceState)
}
}
Create launch_screen.xml file
Create a file called launch_screen.xml in app/src/main/res/layout (create the layout-folder if
it doesn't exist). The contents of the file should be the following:
Customize your launch screen by creating a launch_screen.png-file and placing it in an
appropriate mipmap-folder. Android automatically scales drawable, so you do not necessarily need
to provide images for all phone densities.
You can create splash screens in the following folders:
mipmap-ldpi
mipmap-mdpi
mipmap-hdpi
mipmap-xhdpi
mipmap-xxhdpi
mipmap-xxxhdpi
Add a color called primary_dark in app/src/main/res/values/colors.xml