패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.2.1

another_flutter_splash_screen

앱에서 스플래시 화면을 쉽게 구현할 수 있도록 도와주는 플러터 패키지입니다. 또한 리포지토리에 커리레이티드 데모도 제공됩니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
3.1천
좋아요
310
Pub 점수
150

패키지 설치

flutter pub add another_flutter_splash_screen

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

다른 Flutter 스플래시 스크린은 Flutter 애플리케이션에서 스플래시 화면을 구현하는 것을 간소화하는 가벼운 패키지입니다. 사용자 정의 가능한 지속 시간, 배경 색상 및 로고를 사용하여 스플래시 화면을 표시하기 위한 사용하기 쉬운 API를 제공합니다. 개발자가 빠르게 시작할 수 있도록 리포지토리에 엄선된 예제가 포함되어 있습니다. Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼과 호환되며, 대상 장치에 관계없이 일관된 스플래시 경험을 보장합니다.

사용 사례

  • 빠른 앱 시작 화면 설정
  • 크로스 플랫폼 스플래시 화면 구현
  • 사용자 정의 가능한 스플래시 애니메이션
  • 온보딩 또는 브랜딩 표시
  • 앱 초기화 지연 처리

주요 기능

  • 스플래시 화면 통합을 위한 간단한 API
  • 여러 플랫폼을 지원합니다
  • 내장된 데모 예제
  • 사용자 정의 가능한 지속 시간 및 외관
  • 경량이며 종속성 없음
  • 색상 및 자산의 간편한 사용자 정의

적합한 대상

  • 초보자 플러터 개발자
  • 일관된 온보딩 시각 요소가 필요한 앱
  • 빠른 스플래시 화면 배포가 필요한 프로젝트
  • 크로스플랫폼 모바일 및 데스크톱 앱
  • 최소한의 설정 시간을 원하는 개발자

고려 사항

  • 제한된 고급 애니메이션 옵션
  • 동적 콘텐츠 로드를 위한 내장 지원 없음
  • 포스트 스플래시 탐색에 대한 수동 처리가 필요합니다
  • 복잡한 스플래시 로직에 적합하지 않음
  • 정적 또는 간단한 스플래시 표시에 가장 적합

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

pub package

:star: Splash screens made simple :star:


Supports deciding next screen dynamically. Example here
Supports Immersive Mode (Hide Status Bar in Splash Screen). Example here

Buy Me A Coffee

Getting started

Add another_flutter_splash_screen to your pubspec.yaml file and start implementing splash screen easily.

Installation

Just add another_flutter_splash_screen as a dependency in your pubspec.yaml file.

dependencies:
  another_flutter_splash_screen: <Latest Version>

Usage

 import 'package:another_flutter_splash_screen/another_flutter_splash_screen.dart';

A splash screen with a gif splash.

FlutterSplashScreen.gif(
          gifPath: 'assets/example.gif',
          gifWidth: 269,
          gifHeight: 474,
          nextScreen: const MyHomePage(),
          duration: const Duration(milliseconds: 3515),
          onInit: () async {
            debugPrint("onInit");
          },
          onEnd: () async {
            debugPrint("onEnd 1");
          },
        );

A splash screen with fade in splash.

FlutterSplashScreen.fadeIn(
          backgroundColor: Colors.white,
          onInit: () {
            debugPrint("On Init");
          },
          onEnd: () {
            debugPrint("On End");
          },
          childWidget: SizedBox(
            height: 200,
            width: 200,
            child: Image.asset("assets/dart_bird.png"),
          ),
          onAnimationEnd: () => debugPrint("On Fade In End"),
          nextScreen: const MyHomePage(),
        );

A splash screen with scale splash.

FlutterSplashScreen.scale(
          gradient: const LinearGradient(
            begin: Alignment.topCenter,
            end: Alignment.bottomCenter,
            colors: [
              Colors.lightBlue,
              Colors.blue,
            ],
          ),
          childWidget: SizedBox(
            height: 50,
            child: Image.asset("assets/twitter_logo_white.png"),
          ),
          duration: const Duration(milliseconds: 1500),
          animationDuration: const Duration(milliseconds: 1000),
          onAnimationEnd: () => debugPrint("On Scale End"),
          nextScreen: const MyHomePage(),
        );

Dynamic routing

  • Following is the example of Navigate using different mechanisms
FlutterSplashScreen.gif(
     ...
     // go_router example
     asyncNavigationCallback: () async {
       var response = await userRepository.getUserData();
      if(response.status == 200 && response.data.isAuthenticated){
       GoRouter.of(context).goNamed("home");     
      }
      else{
          // GoRouter.of(context).goNamed("/");
      }
     },
                  OR
     // Named routing example
     asyncNavigationCallback: () async {
       await Future.delayed(const Duration(seconds: 3));
       if (context.mounted) {
         Navigator.pushReplacementNamed(context, "home");
       }
     },
    ...
   );

A splash screen using immersive mode (Hide status bar in splash screen).

Just use "useImmersiveMode : true" to hide status bar in splash screen.

Demo 1
FlutterSplashScreen.gif(
          useImmersiveMode: true,
          gifPath: 'assets/example.gif',
          gifWidth: 269,
          gifHeight: 474,
          nextScreen: const MyHomePage(),
          duration: const Duration(milliseconds: 3515),
        );

A splash screen using lottie animation.

FlutterSplashScreen(
          useImmersiveMode: true,
          duration: const Duration(milliseconds: 2000),
          nextScreen: const MyHomePage(),
          backgroundColor: Colors.white,
          splashScreenBody: Center(
            child: Lottie.asset(
              "assets/lottie_loading_2.json",
              repeat: false,
            ),
          ),
        );

A splash screen with custom splash.

FlutterSplashScreen(
          duration: const Duration(milliseconds: 2000),
          nextScreen: const MyHomePage(),
          backgroundColor: Colors.white,
          splashScreenBody: Center(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                const SizedBox(
                  height: 100,
                ),
                const Text(
                  "Custom Splash",
                  style: TextStyle(color: Colors.black, fontSize: 24),
                ),
                const Spacer(),
                SizedBox(
                  width: 200,
                  child: Image.asset('assets/flutter.png'),
                ),
                const Spacer(),
                const Text(
                  "Flutter is Love",
                  style: TextStyle(color: Colors.pink, fontSize: 20),
                ),
                const SizedBox(
                  height: 100,
                ),
              ],
            ),
          ),
        );

Additional information

We will be more than happy for your contributions.
Please contribute to another_flutter_splash_screen this github repo.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트