搜尋套件、儲存庫與 APP 分類

套件詳情v1.0.4

easy_splash_screen

適用於您 Flutter 應用的簡易啟動畫面外掛程式。您可以輕鬆地整合此外掛程式來顯示啟動畫面,並節省時間。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1120
喜歡數
72
Pub 分數
150

安裝套件

flutter pub add easy_splash_screen

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Easy Splash Screen 是一個 Flutter 插件,可簡化在多個平台上的啟動畫面實作。它讓開發者能快速為應用程式加入可自訂的啟動畫面,而無需撰寫複雜的程式碼。此插件支援 Android、iOS、Web、macOS、Windows 與 Linux,確保一致的啟動體驗。透過最少的設定,可幫助縮短開發時間,同時為使用者提供專業的第一印象。

適用情境

  • 快速為新應用添加啟動畫面
  • 使用圖像或顏色自訂啟動畫面外觀
  • 確保跨平台的一致啟動體驗
  • 減少啟動畫面的樣板程式碼
  • 在跨平台應用程式中整合啟動畫面

主要特色

  • 簡單的設定,程式碼量最少
  • 對多個平台的支援
  • 可自定背景和影像
  • 延遲後自動導航
  • 輕量且易於整合

適合對象

  • 初學者Flutter開發者
  • 需要快速啟動畫面實現的項目
  • 跨平台移動和桌面應用
  • 需要乾淨初始加載畫面的應用程式
  • 開發人員希望節省使用者介面設定的時間

使用建議

  • 超出基本樣式的客製化功能有限
  • 依賴外部倉庫進行更新
  • 可能需要手動處理導航邏輯
  • 不適合複雜的 splash 動畫
  • 最適合靜態啟動畫面,而非動態內容

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Easy Splash Screen

  • easy_splash_screen is a flutter package for easily implement the splash screen in the app

Screenshots

Screenshot

Usage

To use this package :

  • add the dependency to your pubspec.yaml file.
  dependencies:
    flutter:
      sdk: flutter
    easy_splash_screen:
How to use

As time based...

import 'package:easy_splash_screen/easy_splash_screen.dart';
import '../home.dart';
import 'package:flutter/material.dart';

class SplashPage extends StatefulWidget {
  SplashPage({Key? key}) : super(key: key);

  @override
  _SplashPageState createState() => _SplashPageState();
}

class _SplashPageState extends State<SplashPage> {
  @override
  Widget build(BuildContext context) {
    return EasySplashScreen(
      logo: Image.network(
          'https://cdn4.iconfinder.com/data/icons/logos-brands-5/24/flutter-512.png'),
      title: Text(
        "Title",
        style: TextStyle(
          fontSize: 18,
          fontWeight: FontWeight.bold,
        ),
      ),
      backgroundColor: Colors.grey.shade400,
      showLoader: true,
      loadingText: Text("Loading..."),
      navigator: HomePage(),
      durationInSeconds: 5,
    );
  }
}

As future based...

import 'dart:async';

import 'package:easy_splash_screen/easy_splash_screen.dart';
import '../home.dart';
import 'package:flutter/material.dart';

class SplashFuturePage extends StatefulWidget {
  SplashFuturePage({Key? key}) : super(key: key);

  @override
  _SplashFuturePageState createState() => _SplashFuturePageState();
}

class _SplashFuturePageState extends State<SplashFuturePage> {
  Future<Widget> futureCall() async {
    // do async operation ( api call, auto login)
    return Future.value(new HomePage());
  }

  @override
  Widget build(BuildContext context) {
    return EasySplashScreen(
      logo: Image.network(
          'https://cdn4.iconfinder.com/data/icons/logos-brands-5/24/flutter-512.png'),
      title: Text(
        "Title",
        style: TextStyle(
          fontSize: 18,
          fontWeight: FontWeight.bold,
        ),
      ),
      backgroundColor: Colors.grey.shade400,
      showLoader: true,
      loadingText: Text("Loading..."),
      futureNavigator: futureCall(),
    );
  }
}
Parameters
  1. title (Text)
  • App title, shown in the middle of screen in case of no image available
  1. logo (Image)
  • required
  • Your logo to be displayed in the center.
  1. logoWidth (double)
  • default 50
  • logo width as in radius
  1. backgroundColor (Color)
  • Default Colors.white
  1. backgroundImage (ImageProvider)
  • Background image for the entire screen
  1. loaderColor (Color)
  • default Colors.black
  • loader Color.
  1. loadingText (Text)
  • default Text('')
  • Loading text below loader
  1. showLoader (bool)
  • default false
  • Whether to display a loader or not
  1. durationInSeconds (int)
  • default 3
  • durationInSeconds to navigate after for time based navigation
  1. navigator (String or Widget)
  • The page where you want to navigate if you have chosen time based navigation
  1. futureNavigator (Future or Future)
  • expects a function that returns a future, when this future is returned it will navigate
  • If both futureNavigator and navigator are provided, futureNavigator will take priority

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。