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

curved_nav_bar 표지
패키지 상세v0.1.0

curved_nav_bar

FAB가 있는 하단 네비게이션 바입니다. FAB를 중앙 탭으로 사용하거나, 팝업을 열거나 카메라를 켜는 등의 다른 작업을 수행할 수 있습니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
466
좋아요
33
Pub 점수
160

패키지 설치

flutter pub add curved_nav_bar

패키지 개요

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

CurvedNavBar는 커브 디자인의 사용자 정의 가능한 하단 네비게이션 바를 제공하는 Flutter 패키지로, 중심에 플로팅 액션 버튼(FAB)이 있습니다. FAB는 중앙 탭으로 사용하거나 팝업 열기 또는 카메라 실행과 같은 작업을 트리거할 수 있습니다. Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하며 부드러운 애니메이션과 반응형 레이아웃을 제공합니다. 인터랙티브 요소를 갖춘 우아하고 현대적인 네비게이션 경험을 필요로 하는 앱에 적합합니다.

사용 사례

  • 모바일 앱 탐색
  • FAB와 함께 개선된 하단 탭
  • 카메라 또는 팝업 트리거
  • 크로스 플랫폼 UI 일관성
  • 현대적인 앱 디자인
  • 인터랙티브 탐색 제스처

주요 기능

  • 곡선 하단 탐색
  • 사용자 정의 가능한 FAB 위치
  • 다중 플랫폼 지원
  • 부드러운 애니메이션
  • 확장 가능한 작업 처리
  • 반응형 디자인

적합한 대상

  • 현대적인 UI를 찾는 개발자
  • 상호작용형 FAB이 필요한 앱
  • 크로스 플랫폼 모바일 애플리케이션
  • 디자인 중심의 플러터 프로젝트
  • 애니메이션 네비게이션 바를 원하는 사용자

고려 사항

  • 신중한 레이아웃 계획이 필요합니다
  • 복잡한 디자인을 위해 맞춤 스타일링이 필요할 수 있습니다
  • 하단 탐색 사용 사례에 제한됨
  • 플랫폼별 동작은 다를 수 있습니다
  • 하단 탐색이 아닌 시나리오에는 적합하지 않습니다
  • FAB 상호작용 로직은 별도로 구현되어야 합니다

원본 README

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

curved_nav_bar

Bottom nav bar with FAB and center text, You can use FAB as a middle tab or perform other operations like, open popup or open camera (pub.dev).

Screenshots

Usage

Example

To use this package :

dependencies:
   flutter:
     sdk: flutter
   curved_nav_bar:

Getting started

To start, import the dependency in your code:

import 'package:curved_nav_bar/curved_bar/curved_action_bar.dart';
import 'package:curved_nav_bar/fab_bar/fab_bottom_app_bar_item.dart';
import 'package:curved_nav_bar/flutter_curved_bottom_nav_bar.dart';

The following options are available for CurvedNavBar:

Property Type Description
appBarItems List List of FABBottomAppBarItem,length of appBarItems should be equal to the length of bodyItems
bodyItems List List of Widget,length of bodyItems should be equal to the length of appBarItems
extendBody bool extendBody default value always true
actionButton CurvedActionBar Typically a FloatingActionButton
activeColor Color Color of selected tab activeColor default value always Colors.black
inActiveColor Color Color of unselected tab inActiveColor default value always Colors.black26
navBarBackgroundColor Color background Color of navigation bar navBarBackgroundColor default value always Colors.white
actionBarView Widget Set as scaffold body when actionButton selected

Options for FABBottomAppBarItem are:

Property Type Description
activeIcon Widget selected icon of navigation bar item
inActiveIcon Widget unselected icon of navigation bar item
text String label of navigation bar item

Options for CurvedActionBar are:

Property Type Description
activeIcon Widget selected icon for actionButton
inActiveIcon Widget unselected icon of actionButton
text String text label for actionButton
onTab ValueChanged return bool value when tab on actionButton
How to use
import 'package:flutter/material.dart';
import 'package:curved_nav_bar/curved_bar/curved_action_bar.dart';
import 'package:curved_nav_bar/fab_bar/fab_bottom_app_bar_item.dart';
import 'package:curved_nav_bar/flutter_curved_bottom_nav_bar.dart';
void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return CurvedNavBar(
      actionButton: CurvedActionBar(
          onTab: (value) {
            /// perform action here
            print(value);
          },
          activeIcon: Container(
            padding: EdgeInsets.all(8),
            decoration:
                BoxDecoration(color: Colors.white, shape: BoxShape.circle),
            child: Icon(
              Icons.camera_alt,
              size: 50,
              color: Colors.orange,
            ),
          ),
          inActiveIcon: Container(
            padding: EdgeInsets.all(8),
            decoration:
                BoxDecoration(color: Colors.white70, shape: BoxShape.circle),
            child: Icon(
              Icons.camera_alt_outlined,
              size: 50,
              color: Colors.orange,
            ),
          ),
          text: "Camera"),
      activeColor: Colors.blue,
      navBarBackgroundColor: Colors.limeAccent,
      inActiveColor: Colors.black45,
      appBarItems: [
        FABBottomAppBarItem(
            activeIcon: Icon(
              Icons.home,
              color: Colors.blue,
            ),
            inActiveIcon: Icon(
              Icons.home,
              color: Colors.black26,
            ),
            text: 'Home'),
        FABBottomAppBarItem(
            activeIcon: Icon(
              Icons.wallet_giftcard,
              color: Colors.blue,
            ),
            inActiveIcon: Icon(
              Icons.wallet_giftcard,
              color: Colors.black26,
            ),
            text: 'Wallet'),
      ],
      bodyItems: [
        Container(
          height: MediaQuery.of(context).size.height,
          color: Colors.blue,
        ),
        Container(
          height: MediaQuery.of(context).size.height,
          color: Colors.pinkAccent,
        )
      ],
      actionBarView: Container(
        height: MediaQuery.of(context).size.height,
        color: Colors.orange,
      ),
    );
  }
}

Pull Requests

Pull requests are most welcome. It usually will take me within 24-48 hours to respond to any issue or request.

  1. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)
  2. Pull requests must be made against develop branch. Any other branch (unless specified by the maintainers) will get rejected.
Created & Maintained By

Boffin Coders Pvt. Ltd.

If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of :coffee:

License

Copyright 2018 Boffin Coders Pvt. Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

카테고리

소스 저장소

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

아직 데이터가 없습니다.