搜索插件、代码仓与 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开发者
  • 需要快速启动屏幕实现的项目
  • 跨平台移动和桌面应用
  • 需要干净初始加载屏幕的应用程序
  • 开发人员希望节省用户界面设置的时间

使用建议

  • 超出基本样式的定制功能有限
  • 依赖外部仓库进行更新
  • 可能需要手动处理导航逻辑
  • 不适合复杂的溅射动画
  • 最适合静态启动画面,而非动态内容

原始 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

所属分类

源码仓库

使用此插件的项目

暂无相关数据。