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

expand_widget 표지
패키지 상세v3.1.1

expand_widget

위젯 컬렉션 또는 텍스트를 쉽게 확장하고 접을 수 있는 기능

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
5.7천
좋아요
147
Pub 점수
150

패키지 설치

flutter pub add expand_widget

패키지 개요

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

expand_widget 패키지는 위젯이나 텍스트 콘텐츠의 확장 및 수축을 애니메이션화하는 간단하고 직관적인 방법을 제공합니다. 접힌 상태와 확장된 상태 사이의 부드러운 전환을 가능하게 하며, 아코디언이나 접을 수 있는 섹션과 같은 인터랙티브한 UI 요소를 만들기에 적합합니다. 사용의 용이성을 고려하여 설계되었으며, 다양한 플랫폼에서 작동하는 Flutter 앱에 원활하게 통합됩니다. 사용자 정의 애니메이션, 지속 시간 제어, 유연한 콘텐츠 레이아웃을 지원하여 소규모 컴포넌트부터 복잡한 UI 구조까지 모두 활용할 수 있습니다.

사용 사례

  • 접을 수 있는 아코디언 만들기
  • 상호작용형 자주 묻는 질문 섹션 만들기
  • 목록에서 콘텐츠 표시 애니메이션
  • 반응형 카드 인터페이스 설계
  • 동적 폼 섹션 구현

주요 기능

  • 부드러운 전개/수축 애니메이션
  • 사용자 정의 애니메이션 지속 시간
  • 모든 위젯을 콘텐츠로 지원
  • 기존 레이아웃과의 간편한 통합
  • 유연한 트리거 메커니즘

적합한 대상

  • 간단한 확장 컨트롤을 원하는 개발자
  • 인터랙티브 카드를 구축하는 UI 디자이너
  • 동적 콘텐츠 전환을 필요로 하는 앱
  • 크로스플랫폼 플러터 애플리케이션
  • 아코디언 스타일 인터페이스를 가진 프로젝트

고려 사항

  • 큰 위젯 트리에서 성능에 영향을 미칠 수 있습니다
  • 상태 관리에 신중한 접근이 필요합니다
  • 애니메이션 동작은 부모 레이아웃 제약 조건에 따라 달라집니다
  • 매우 높은 주파수 전환에 최적화되지 않음
  • 최적의 반응성 확보를 위해 가벼운 콘텐츠와 함께 사용하는 것이 가장 좋습니다

원본 README

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

Expand Widget

Package style: very good analysis Build Patreon License

This Dart package offers developers a streamlined library of Flutter widgets, useful for expanding widgets and text views, when users interact with them.

There are two main 'expand' widgets:

  • Expand Child: Useful to show more widgets related to the content already visible by the user.
  • Expand Text: Useful when texts can be quite big for a certain screen. It adds the ability to show the full content when the user wants to.

Features

  • The ExpandIndicatorStyle parameter allows you to select various render options, related to the expand arrow itself.

  • Hide the arrow widget when the view is being expanded, using the hideIndicatorOnExpand parameter.

  • Custimze the arrow widget itself: color, size, padding, icon...

  • You can also provide your own widget for the expand indicator, using the indicatorBuilder for both expaning widgets.

  • Use custom expanding hint strings! By default, it will use the ones provided by MaterialLocalizations.

  • Expand text view with swipe-down gestures, using the expandOnGesture, which by default is set to false.

  • You can also customize expand animation duration and curve easilly.

  • The collapsedVisibilityFactor (exclusive to the ExpandChild widget), allows the reveal of a section of the hidden content.

Example

Here is an example of a simple use of this package, featuring the ExpandChild & ExpandText widgets.

If you want to take a deeper look at the example, take a look at the example folder provided with the project.

  • ExpandChild
ExpandChild(
  child: Column(
    children: [
      OutlineButton(
        child: Text('Button1'),
        onPressed: () => print('Pressed button1'),
      ),
      OutlineButton(
        child: Text('Button2'),
        onPressed: () => print('Pressed button2'),
      ),
      OutlineButton(
        child: Text('Button3'),
        onPressed: () => print('Pressed button3'),
      ),
    ],
  ),
),
  • ExpandText
ExpandText(
  'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
  textAlign: TextAlign.justify,
),

Getting Started

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Built with

Authors

License

This project is licensed under the GNU GPL v3 License - see the LICENSE file for details.

카테고리

소스 저장소

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