안드로이드 및 iOS에서 스플래시 화면을 제어하기 위한 프로그래밍 API를 제공하는 플러터 패키지입니다. 앱 시작 중에 스플래시 화면을 동적으로 표시하고 숨길 수 있어 부드러운 전환과 사용자 정의 스플래시 로직을 가능하게 합니다. 네이티브 플랫폼과 원활하게 통합되며, 추가 구성 없이 iOS와 안드로이드 모두를 지원합니다. 앱 상태에 따라 스플래시 화면을 조건부로 처리하거나 지연 표시가 필요한 앱에 적합합니다.
사용 사례
다이나믹 스플래시 제어
앱 초기화 지연
조건부 스플래시 표시
온보딩 통합
사용자 지정 스플래시 전환
로그인 후 스플래시 관리
주요 기능
프로그래머틱 표시/숨기기
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