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

GitHub 저장소imsujan276/EasySplashScreen

EasySplashScreen

CustomSplashScreen은 쉽게 스플래시 화면을 추가할 수 있는 Flutter 플러그인입니다

EasySplashScreen 프로젝트 이미지
스타
3
포크
5
최근 푸시(UTC)
2023. 3. 9.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

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
Sujan Gainju GitHub avatar
GitHub 작성자

Sujan Gainju ↗

Computer engineer, Flutter Developer, Freelancer

언어DartHTMLSwiftKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개

  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗