FLUTTER ECOSYSTEM

TrangLeQuynh/flexible_dropdown

TrangLeQuynh/flexible_dropdown open-source repository details.

flexible_dropdown 프로젝트 이미지
Stars
4
Forks
0
최근 푸시(UTC)
2025. 12. 21.
프로젝트 상태
활성
TrangLeQuynh GitHub avatar
GITHUB User

TrangLeQuynh ↗

언어DartSwiftRubyKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개
  • flutter{"sdk":"flutter"}
  • plugin_platform_interface^2.0.2
  • flutter_test개발 의존성{"sdk":"flutter"}
  • flutter_lints개발 의존성^2.0.0

원본 README

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

README 펼치기 / 접기

Flexible Dropdown Package

Features

  • Customize dropdown

  • Auto scroll to selected item position

  • Support BarrierShape.headerTrans to highlight the content above the flexible dropdown button

  • Allows the dropdown to be dismissed by tapping | panning the scrim or by pressing the escape key on the keyboard.

  • Allow to choose the Animation Type

Installation

First, add flexible_dropdown as a dependency in your pubspec.yaml file.

dependencies:
  flexible_dropdown: ^1.0.7

Usage

FlexibleDropdown(
  overlayChild: Container(
    height: 160,
    width: double.infinity,
    color: Colors.deepPurple,
  ),
  barrierColor: Colors.black38.withOpacity(.2),
  barrierShape: BarrierShape.headerTrans,
  textDirection: TextDirection.ltr,
  offset: Offset.zero,
  duration: const Duration(milliseconds: 400),
  animationType: AnimationType.size,
  animationAlignment: Alignment.topCenter,
  child: Container(
    decoration: BoxDecoration(
      borderRadius: BorderRadius.circular(6),
      color: Colors.blueAccent.withOpacity(.2),
    ),
    child: Padding(
      padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 20),
      child: Text(
        title,
        style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
      ),
    ),
  ),
)

Usage to close the flexible dropdown:

Navigator.pop(context);

Animation Type

scale scaleX scaleY
https://raw.githubusercontent.com/TrangLeQuynh/flexible_dropdown/HEAD/assets/scale.gif https://raw.githubusercontent.com/TrangLeQuynh/flexible_dropdown/HEAD/assets/scaleX.gif https://raw.githubusercontent.com/TrangLeQuynh/flexible_dropdown/HEAD/assets/scaleY.gif
size slide fade
https://raw.githubusercontent.com/TrangLeQuynh/flexible_dropdown/HEAD/assets/size.gif https://raw.githubusercontent.com/TrangLeQuynh/flexible_dropdown/HEAD/assets/slide.gif https://raw.githubusercontent.com/TrangLeQuynh/flexible_dropdown/HEAD/assets/fade.gif
rotate
https://raw.githubusercontent.com/TrangLeQuynh/flexible_dropdown/HEAD/assets/rotate.gif

Note: AnimationType.size is only suitable for width of overlayChild is full screen width.