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

skeleton_text 표지
패키지 상세v3.0.1

skeleton_text

Flutter 프로젝트에 스켈레톤 텍스트 로딩 애니메이션을 쉽게 추가할 수 있도록 도와주는 패키지입니다. 이 프로젝트는 101Loop 커뮤니티의 일부입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
2.7만
좋아요
350
Pub 점수
150

패키지 설치

flutter pub add skeleton_text

패키지 개요

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

데이터 로딩 중 사용자 경험을 향상시키기 위해 스켈레톤 텍스트 로딩 애니메이션을 쉽게 추가할 수 있도록 도와주는 플러터 패키지입니다. 실제 텍스트 레이아웃을 모방하는 애니메이션 반짝임 효과를 가진 자리 표시 콘텐츠를 깔끔하고 사용자 정의 가능한 방식으로 표시합니다. 101Loop 커뮤니티의 일부로, 안드로이드, iOS, 웹, macOS, 윈도우, 리눅스 등 모든 주요 플랫폼을 지원합니다. UI 반응성을 향상시키기 위한 경량 솔루션을 찾는 개발자에게 이상적입니다.

사용 사례

  • 로딩 화면 자리표시자
  • 제품 카드 자리 표시자
  • 목록 항목 스켈레톤
  • 프로필 페이지 로딩 상태
  • 동적 콘텐츠 미리보기

주요 기능

  • 애니메이션된 반짝임 효과
  • 사용자 지정 가능한 너비 및 높이
  • 여러 줄을 지원
  • 기존 위젯과의 간편한 통합
  • 경량이고 성능이 뛰어남

적합한 대상

  • UI/UX 디자이너
  • 플러터 초보자
  • 로딩 상태가 필요한 앱 개발자
  • 동적 콘텐츠를 가진 프로젝트
  • 성능에 민감한 앱

고려 사항

  • 텍스트 전용 자리 표시자만 가능
  • 이미지에 내장된 지원 없음
  • 복잡한 레이아웃을 위해 수동 스타일링이 필요합니다
  • 비텍스트 로딩 시나리오에는 적합하지 않습니다
  • 플랫폼별 렌더링에 의존합니다

원본 README

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

skeleton_text

A package provides an easy way to add skeleton text loading animation in Flutter project

Dependency

dependencies:
  skeleton_text: 

How To Use

import 'package:skeleton_text/skeleton_text.dart';

To achieve the above example animation use the following code :

 ListView.builder(
   scrollDirection: Axis.vertical,
   physics: BouncingScrollPhysics(),
   itemCount: 5,
   itemBuilder: (BuildContext context, int index) {
     return Container(
       height: 240,
       margin: EdgeInsets.symmetric(horizontal: 20),
       child: Row(
         children: [
           Expanded(
             child: SkeletonAnimation(
               shimmerColor: Colors.grey,
               borderRadius: BorderRadius.circular(20),
               shimmerDuration: 1000,
               child: Container(
                 decoration: BoxDecoration(
                   color: Colors.grey[300],
                   borderRadius: BorderRadius.circular(20),
                   boxShadow: shadowList,
                 ),
                 margin: EdgeInsets.only(top: 40),
               ),
             ),
           ),
           Expanded(
             child: Container(
               margin: EdgeInsets.only(top: 60, bottom: 20),
               decoration: BoxDecoration(
                 color: Colors.grey,
                 boxShadow: shadowList,
                 borderRadius: BorderRadius.only(
                   topRight: Radius.circular(20),
                   bottomRight: Radius.circular(20),
                 ),
               ),
               child: Column(
                 mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                 crossAxisAlignment: CrossAxisAlignment.start,
                 mainAxisSize: MainAxisSize.max,
                 children: <Widget>[
                   Padding(
                     padding: const EdgeInsets.only(left: 15.0, bottom: 5.0),
                     child: SkeletonAnimation(
                       borderRadius: BorderRadius.circular(10.0),
                       shimmerColor: index % 2 != 0 ? Colors.grey : Colors.white54,
                       child: Container(
                         height: 30,
                         width: MediaQuery.of(context).size.width * 0.35,
                         decoration: BoxDecoration(
                             borderRadius: BorderRadius.circular(10.0),
                             color: Colors.grey[300]),
                       ),
                     ),
                   ),
                   Padding(
                     padding: const EdgeInsets.only(left: 15.0),
                     child: Padding(
                       padding: const EdgeInsets.only(right: 5.0),
                       child: SkeletonAnimation(
                         borderRadius: BorderRadius.circular(10.0),
                         shimmerColor: index % 2 != 0 ? Colors.grey : Colors.white54,
                         child: Container(
                           width: 60,
                           height: 30,
                           decoration: BoxDecoration(
                               borderRadius: BorderRadius.circular(10.0),
                               color: Colors.grey[300]),
                         ),
                       ),
                     ),
                   ),
                 ],
               ),
             ),
           ),
         ],
       ),
     );
   },
 )

Explanation

I have created a List builder of 5 Containers. Wrapping any widget by SkeletonAnimation would give a beautiful loading animation.

SkeletonAnimation Constructor :

  SkeletonAnimation({
      @required this.child,
      this.shimmerColor = Colors.white54,
      this.gradientColor = const Color.fromARGB(0, 244, 244, 244),
      this.curve = Curves.fastOutSlowIn,
      this.borderRadius = const BorderRadius.all(Radius.circular(0)),
      this.shimmerDuration = 1000,
      Key key,
    })

카테고리

소스 저장소

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