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

water_drop_nav_bar 표지
패키지 상세v2.2.2

water_drop_nav_bar

하단 탐색 바는 고유한 물방울 효과를 갖추고 있습니다. 물방울이 떨어질 때 선택된 항목을 표시합니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
321
좋아요
400
Pub 점수
160

패키지 설치

flutter pub add water_drop_nav_bar

패키지 개요

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

선택된 항목이 떨어지는 물방울처럼 시각적으로 강조되는 독특한 물방울 효과를 가진 하단 네비게이션 바입니다. Flutter 앱을 위한 것으로, 부드럽고 애니메이션 기반 피드백 메커니즘을 통해 사용자 상호작용을 향상시킵니다. 이 패키지는 Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하여 크로스플랫폼 개발에 유연하게 활용할 수 있습니다. 가볍고 간단한 pub 명령어로 쉽게 통합할 수 있으며, 현대적이고 매력적인 탐색 경험을 원하는 앱에 적합합니다.

사용 사례

  • 모바일 앱 탐색
  • 크로스 플랫폼 애플리케이션
  • 인터랙티브 UI 요소
  • 현대적인 디자인 인터페이스
  • 사용자 참여 기능

주요 기능

  • 물방울 애니메이션 효과
  • 스무스한 선택 피드백
  • 다중 플랫폼 지원
  • pub를 통한 간편한 통합
  • 사용자 정의 가능한 외관
  • 가볍고 성능이 뛰어남

적합한 대상

  • 플러터 개발자
  • 디자인 중심 앱
  • 높은 사용자 상호작용을 가진 앱
  • 현대적인 UI/UX 프로젝트
  • 크로스 플랫폼 모바일 개발

고려 사항

  • 저사양 기기에서 성능에 영향을 줄 수 있습니다
  • 애니메이션에 대한 사용자 정의 옵션이 제한되어 있습니다
  • 미니멀리스트 디자인에 적합하지 않습니다
  • 정교한 색상 조율이 필요합니다
  • 일부 맥락에서 애니메이션은 사용자의 집중을 방해할 수 있습니다

원본 README

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

Water Drop Nav Bar

YouTube Badge Twitter Badge Patreon Badge pub package WateryDesert


Design Credit & screen recording

Animated Tabbar by Cuberto

How to use?

Installation

Add water_drop_nav_bar: to your pubspec.yaml dependencies then run flutter pub get

 dependencies:
  water_drop_nav_bar:
Import

Add this line to import the package.

import 'package:water_drop_nav_bar/water_drop_nav_bar.dart';

Add WaterDropNavBar() as bottomNavigationBar of Scaffold() and body would be PageView() with NeverScrollableScrollPhysics() don't try to upate the seleted index from onPageChanged or will see some weird behaviour. Insted of PageView() You can use Stack() or AnimatedSwitcher for custom page transition animation.

API Reference

barItems → List<BarItem>

  • List of bar items that shows horizontally, Minimum 2 and maximum 4 items.
    required

onItemSelected → OnButtonPressCallback

  • Callback When individual barItem is pressed.
    required

selectedIndex → int

  • Current selected index of the bar item.
    required

backgroundColor → Color

  • Background Color of the bar.
    optional [Colors.white]

waterDropColor → Color

  • Color of water drop which is also the active icon color.
    optional [Color(0xFF5B75F0)]

inactiveIconColor → Color

  • Inactive icon color by default it will use water drop color.
    optional [waterDropColor]

iconSize → double

  • Each active & inactive icon size, default value is 28 don't make it too big or small.
    optional [28]

bottomPadding → double

  • Additional padding at the bottom of the bar. If nothing is provided the it will use [MediaQuery.of(context).padding.bottom] value.
    optional
Do and don't
  • Don't make icon size too big.
  • Use complementary filled and outlined icons for best result.
  • backgroundColor and waterDropColor of WaterDropNavBar() and Scaffold()'s backgroundColor (or whatever widget you are using) must be different (see the example app) This will visualize that the water drop is hanging from the top.
Short example
 return Scaffold(
     
      body: PageView(
      physics: NeverScrollableScrollPhysics(),       
      controller: pageController,
       ...
      ),
      bottomNavigationBar: WaterDropNavBar(
        backgroundColor: Colors.white,
        onItemSelected: (index) {
          setState(() {
            selectedIndex = index;
          });
          pageController.animateToPage(selectedIndex,
              duration: const Duration(milliseconds: 400),
              curve: Curves.easeOutQuad);
        },
        selectedIndex: selectedIndex,
        barItems: [
          BarItem(
            filledIcon: Icons.bookmark_rounded,
            outlinedIcon: Icons.bookmark_border_rounded,
          ),
          BarItem(
              filledIcon: Icons.favorite_rounded,
              outlinedIcon: Icons.favorite_border_rounded),
        ],
      ),
    );

Issues ❗️

Android

Some android phones might have black navigation bar, this looks ugly. It's recommended to wrap Scaffold with AnnotatedRegion<SystemUiOverlayStyle> to change that black navigation bar color to WaterDropNavBar backgroundColor. Check the example app. Like this 👇

return AnnotatedRegion<SystemUiOverlayStyle>(
     value: const SystemUiOverlayStyle(
       //this color must be equal to the WaterDropNavBar backgroundColor
       systemNavigationBarColor: Colors.white, 
       systemNavigationBarIconBrightness: Brightness.dark,
     ),
     child: Scaffold(
       body: // code here
     )
);

result 👇


You can additionally provide some bottomPadding to add padding at the bottom of the bar, I think 8 is enough.

iPhone

iPhones without swipe home gesture might have such issue where icons are pushed to the bottom. Provide some bottomPadding. I added 8 padding here.

result 👇

Now you might ask how do you know which phone is using swipe home gesture?

Well, you can check bottom padding (using MediaQuery.of(context).padding.bottom) and if it's less than 34 or something then provide some bottom padding. Definitely try running different simulators and see.

FAQ

  • How do I change the height?

The height must be constant because the animation is in vertical direction. According to me 60 is perfect. But if you think needs to be reduced then please create an issue with a screenshot. I will see if I can do something.

  • How do I add drop shadow?

Wrap WaterDropNavBar with DecoratedBox or Container and pass BoxDecoration to decoration property. BoxDecoration takes list of boxShadow there you can pass your drop shadow.

DecoratedBox(
    decoration: BoxDecoration(
      boxShadow: [
        BoxShadow(
            color: Colors.black.withOpacity(0.2),
            offset: Offset(0, 4),
            blurRadius: 8.0)
      ],
    ),
    child: WaterDropNavBar()
)
  • How do I change the corner radius of the navigation bar?

Wrap WaterDropNavBar with ClipRRect and pass BorderRadius to borderRadius property.

  ClipRRect(
      borderRadius: const BorderRadius.vertical(
        top: Radius.circular(16),
      ),
      child: WaterDropNavBar(
    )                

All flutter packages

● Sliding Clipped Nav Bar
➜ Water Drop Nav Bar
● Swipeable Tile
● Loading Animation Widget


카테고리

소스 저장소

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

아직 데이터가 없습니다.