iT邦幫忙

2021 iThome 鐵人賽

DAY 29
0
Mobile Development

Flutter with GetX, loading*175%歷程 系列 第 29

[Day29] Flutter with GetX native_splash

flutter_native_splash

App 啟動時的launch畫面

首先在pubspec.yaml檔案裡新增

dev_dependencies:
  flutter_native_splash: ^1.2.0

接著在最底下新增flutter_native_splash,
並且把圖放到assets路徑底下.

flutter_native_splash:
  image: assets/LaunchLogo.png
  android_gravity: center
  ios_content_mode: center 
  # platform.
  android: true
  ios: true
  web: false

接著在terminal輸入
flutter pub run flutter_native_splash:create

出現以下訊息代表成功
https://ithelp.ithome.com.tw/upload/images/20211008/20140296gfNlytNbsk.png

實際效果如下
i-LeGpeG-qY6k4iFEw

本篇的GitHub source code


上一篇
[Day28] Flutter with GetX Socket.io
下一篇
[Day30] Flutter with GetX flutter_WebRTC
系列文
Flutter with GetX, loading*175%歷程 30

尚未有邦友留言

立即登入留言