개발/Flutter

Splash Screen in Flutter

Byunpa24 2021. 10. 6. 15:13
반응형

Splash Screen has to be always implemented NATIVELY!!

 

1) pubspec.yaml 파일에 이렇게 넣어준다

 

2) Go to the root folder in terminal or console에 가서 

- flutter clean

- flutter pub get

- flutter pub run flutter_native_splash:create

 

를 해준다. 그럼 아래와 같이 성공적으로 추가됨을 알 수 있다.

 

3) light mode / dark mode를 쓸 수 있고, fill property도 지정할 수 있다.

flutter_native_splash:

color: "#32b3a4" 

image: assets/images/skyicon.png

color_dark: "#1a1a1a"

image_dark: assets/images/skyicon.png

android: true

ios: true

android_gravity: fill

ios_content_mode: scaleAspectFill

반응형