FLUTTER ECOSYSTEM

youssefali424/animated_image_list

Flutter 애니메이션 파라락스 이미지 목록

animated_image_list 프로젝트 이미지
Stars
9
Forks
2
최근 푸시(UTC)
2021. 5. 30.
프로젝트 상태
활성
youssef ali GitHub avatar
GITHUB User

youssef ali ↗

Mobile developer (Android/React native/Flutter)

Objects
언어DartHTMLSwiftKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • gesture_x_detector^1.0.0-nullsafety.1
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

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

README 펼치기 / 접기

Animated Image List for Flutter

Pub

Flutter Animated image list with parallax effect and image lightbox .

gif

https://img.youtube.com/vi/MGTt9eqJioc/0.jpg https://img.youtube.com/vi/gTqUJB75Scc/0.jpg

https://img.youtube.com/vi/iLn3OgV07KY/0.jpg https://img.youtube.com/vi/FLpzHNzCSQ8/0.jpg

Getting Started

Add the package to your pubspec.yaml:

animated_image_list: ^0.5.0

In your dart file, import the library:

import 'package:animated_image_list/AnimatedImageList.dart';

Instead of using a ListView create a AnimatedImageList Widget:

 AnimatedImageList(
               images: arr.map((e) => e.urls.small).toList(),
               builder: (context, index, progress) {
                 return Positioned.directional(
                     textDirection: TextDirection.ltr,
                     bottom: 15,
                     start: 25,
                     child: Opacity(
                       opacity: progress > 1 ? (2 - progress) : progress,
                       child: Text(
                         arr[index].user.username ?? 'Anonymous',
                         style: TextStyle(
                             color: Colors.white,
                             fontSize: 25,
                             fontWeight: FontWeight.w500),
                       ),
                     ));
               },
               scrollDirection: Axis.vertical,
               itemExtent: 100,
               maxExtent: 400,
             ),
Parameters:
Name Description Required Default value
images A list of images url to display in the list by default it accepts urls if custom image needed use provider paramter required -
provider Function which maps an url or image string to an image provider - -
itemExtent not selected item size required to calculate animations required 150
maxExtent selected item size required to calculate animations required 400
scrollDirection List scroll direction horizontal or vertical - Axis.vertical
builder Builder function that returns a widget to display over the image / progress from 0...1 item selection progress from 1...2 item leaving view could be usefull if you want to animate something like text opacity above / index current item index - -
placeHolder Optional function which returns default placeholder for lightbox and error widget if image fails to load - kTransparentImage