FLUTTER ECOSYSTEM

lazydeveloperdotdev/r_nav_n_sheet

Flutter용 애니메이션 처리된 현대적이고 매우 사용자 정의 가능한 하단 네비게이션 바

r_nav_n_sheet 프로젝트 이미지
Stars
2
Forks
5
최근 푸시(UTC)
2024. 10. 1.
프로젝트 상태
활성
Raj Yadav GitHub avatar
GITHUB User

Raj Yadav ↗

A multi-skilled and dedicated IT professional with over 5 years of experience, adept in software development, and well-versed in different programming languages

Falabella IndiaBangalore
언어Dart

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • flutter_lints개발 의존성^2.0.1

원본 README

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

README 펼치기 / 접기

RNavNSheet

Pub License GitHub code size in bytes GitHub stars

Animated, modern and highly customisable bottom navigation bar for flutter

Features

  • Animated, modern looking and highly customizable bottom navigation bar
  • Custom bottom sheet with center docked action button to toggle the bottom sheet
DEMO 1 DEMO 2 DEMO 3
DEMO1 DEMO2 DEMO3

Getting started

  • Add r_nav_n_sheet: <latest_version> to pubspec.yaml
  • Run flutter pub get in the terminal in the project directory or select pub get from within pubspec.yaml file
  • Add import statement,
import 'package:r_nav_n_sheet/r_nav_n_sheet.dart';

Usage


@override
Widget build(BuildContext context) {
  return Scaffold(
    //Other scaffold properties
      bottomNavigationBar: RNavNSheet(
        sheet: MySheet(), //Replace MySheet with your own bottom sheet
        items: const [
          RNavItem(
            icon: Icons.home_outlined,
            activeIcon: Icons.home,
            label: "Home",
          ),
          RNavItem(
            icon: Icons.search_outlined,
            activeIcon: Icons.search,
            label: "Search",
          ),
          RNavItem(
            icon: Icons.shopping_cart_outlined,
            activeIcon: Icons.shopping_cart,
            label: "Cart",
          ),
          RNavItem(
            icon: Icons.person,
            activeIcon: Icons.person_outline,
            label: "Account",
          ),
        ],
      )
  );
}

Additional information

For full implementation, see example

RNavItem
Attributes Type Description
icon IconData icon when item is not selected
activeIcon IconData? icon when item is selected, icon is used if activeIcon not passed
label String label for the item
RNavNSheet
Attributes Type Description
items List<RNavItem> list of bottom navigation items
initialSelectedIndex int? index of default selected item
sheet Widget? bottom sheet to be displayed on dock icon click
sheetOpenIcon IconData? toggle button icon when sheet is open
sheetCloseIcon IconData? toggle button icon when sheet is closed
sheetOpenIconBoxColor Color? toggle button background color when sheet is open
sheetCloseIconBoxColor Color? toggle button background color when sheet is closed
sheetOpenIconColor Color? toggle button foreground color when sheet is open
sheetCloseIconColor Color? toggle button foreground color when sheet is closed
sheetIconRotateAngle double? angle (in radians) to rotate toggle button when sheet is open
sheetToggleDecoration BoxDecoration? decoration for toggle button
borderColors List<Color>? list of colors for border over nav bar (gradient from left to right)
backgroundColor Color? background color of nav bar
backgroundGradient Gradient? background gradient of nav bar
selectedItemColor Color? color of selected nav item (overrides gradient)
unselectedItemColor Color? color of unselected nav item
selectedItemGradient Gradient? gradient of selected nav item
unselectedItemGradient Gradient? gradient of unselected nav item
onTap void Function(int)? function callback that returns index of selected item
onSheetToggle void Function(bool)? function callback that returns true if sheet is open and false if sheet is closed