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

animated_button_bar 표지
패키지 상세v1.0.0

animated_button_bar

선택된 항목에 애니메이션이 있는 매우 사용자 정의 가능한 버튼 바.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
604
좋아요
82
Pub 점수
150

패키지 설치

flutter pub add animated_button_bar

패키지 개요

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

항목을 선택할 때 부드러운 애니메이션을 제공하는 커스터마이저블 버튼 바를 제공하는 플러터입니다. 개발자가 버튼 간의 애니메이션 전환과 함께 상호작용적이고 시각적으로 매력적인 네비게이션 바를 만들 수 있도록 합니다. 여러 플랫폼을 지원하며 색상, 모양, 애니메이션 지속 시간에 대한 광범위한 스타일링 옵션을 제공합니다. 직관적인 탭 기반 네비게이션과 동적 피드백이 필요한 앱에 적합합니다.

사용 사례

  • 인터랙티브 탐색 바
  • 탭 기반 인터페이스
  • 애니메이션 UI 전환
  • 사용자 정의 가능한 하단 탐색
  • 선택에 대한 사용자 피드백
  • 모바일 및 웹 앱 대시보드

주요 기능

  • 부드러운 선택 애니메이션
  • 높은 사용자 정의 가능한 외관
  • 크로스 플랫폼 지원
  • 사용자 정의 가능한 애니메이션 지속 시간
  • 유연한 레이아웃 옵션
  • 터치 제스처를 지원합니다

적합한 대상

  • 현대적인 UI를 구축하는 Flutter 개발자
  • 애니메이션 네비게이션을 필요로 하는 앱
  • 사용자 경험에 집중하는 디자이너
  • 다중 플랫폼을 대상으로 하는 프로젝트
  • 재사용 가능한 컴포넌트를 원하는 개발자

고려 사항

  • 항목이 많을 경우 성능에 영향을 미칠 수 있습니다
  • 애니메이션 속도를 신중하게 조정해야 합니다
  • 제한된 내장 테마
  • 간단한 정적 버튼에 적합하지 않습니다
  • 정확한 상태 관리에 의존합니다
  • 반응형 디자인 패턴과 함께 사용하는 것이 가장 좋습니다

원본 README

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

animated_button_bar

AnimatedButtonBar is a flutter library that allows you to create a row of buttons with an animation on selection.

Getting started

Add this to your app's pubspec.yaml file:

dependencies:  
  animated_button_bar: ^0.0.2

Usage

Then you have to import the package with:

import 'package:animated_button_bar/animated_button_bar.dart';  

And use an AnimatedBarButton like this:

  Column(  
          mainAxisAlignment: MainAxisAlignment.center,  
          children: [  
            //inverted selection button bar  
            AnimatedButtonBar(  
              radius: 8.0,  
              padding: const EdgeInsets.all(16.0),  
              invertedSelection: true,  
              children: [  
                ButtonBarEntry(onTap: () => print('First item tapped'), child: Text('Day')),  
                ButtonBarEntry(onTap: () => print('Second item tapped'), child: Text('Week')),  
                ButtonBarEntry(onTap: () => print('Third item tapped'), child: Text('Month')),  
                ButtonBarEntry(onTap: () => print('Fourth item tapped'), child: Text('Year'))  
              ],  
            ),  
            //You can populate it with different types of widgets like Icon  
            AnimatedButtonBar(  
              radius: 32.0,  
              padding: const EdgeInsets.all(16.0),  
              backgroundColor: Colors.blueGrey.shade800,  
              foregroundColor: Colors.blueGrey.shade300,  
              elevation: 24,  
              borderColor: Colors.white,  
              borderWidth: 2,  
              innerVerticalPadding: 16,  
              children: [  
                ButtonBarEntry(onTap: () => print('First item tapped'), child: Icon(Icons.person)),  
                ButtonBarEntry(onTap: () => print('Second item tapped'), child: Icon(Icons.people)),  
              ],  
            ),  
          ],  
        ),  

Result

parameters

parameter description default
animationDuration animation duration when tap const Duration(milliseconds: 200)
backgroundColor main color of the widget Theme.of(context).backgroundColor
borderColor color of the border null
borderWidth width of the border borderColor != null ? 1.0 : 0.0;
children A list of ButtonBarEntry to display required
curve the curve for the animation Curves.fastOutSlowIn
elevation double 0
foregroundColor color for the selection Theme.of(context).accentColor
invertedSelection bool false
radius double 0.0
verticalPadding double 8.0

카테고리

의존성

의존성 목록 1 개

소스 저장소

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