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

GitHub 저장소mahmoud-haj-ali/slidable_bar

슬라이드 바

애니메이션을 사용하여 사이드바를 표시/숨기는 데 사용할 수 있는 플러터 패키지

슬라이드 바 프로젝트 이미지
스타
3
포크
3
최근 푸시(UTC)
2024. 6. 21.
프로젝트 상태
활성

원본 README

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

slidable_bar

A Flutter side bar slider can be with any widget you want

review

Features

  • The SlidableBar can have four positions: top, bottom, right and left.
  • Customizable clicker, you can change the clicker widget with what you want.
  • Just like Flutter's Drawer, but with new way.

Things to note

  • The SlidableBar should have specific width and height, it works fine with scaffold's body.
  • The SlidableBar doesn't create it's own context, so it will appear under floating action button if you add one.

Usage

    final SlidableBarController controller = SlidableBarController(initialStatus: true);
    
    SlidableBar(
        size: 50, // this will be bar's height in case Side is bottom or top and width in case Side is left or right 
        children: <Widget>[], // here is the widgets inside the bar
        child: Container(), // here is your widget that will be under the bar 
        // optional
        frontColor: Colors.green, // the color of the cycle inside the default clicker
        slidableController: controller, // the contoller to change and listen to the bar status
        barRadius: const BorderRadius.circular(10.0), // the contoller to change and listen to the bar status
        side: Side.bottom, // Side.right is the default
        clickerPosition: 1.0, // the position of the clicker, 0.0 is the default
        clickerSize: 60, // the sizer of the default clicker, 55 is the default
        onChange: (int index){
            print(index); // this will print the index of the widget you clicked inside the bar
        },
        duration: Duration(milliseconds: 500), // the duration of the animation, (300 mil) is the default
        isOpenFirst: true, // the initial state of the bar, false is default
        backgroundColor: Colors.black, // primary color is default
        curve: Curves.ease, // the animation curve, linear is defualt
        clicker: Icon(Icons.arrow_forward_ios), // this will build instead of the default clicker
      )

Getting started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  slidable_bar: "^1.1.0"

Then run $ flutter pub get. In your library, add the following import:

import 'package:slidable_bar/slidable_bar.dart';

Preview Images (The positions)

right left

top bottom

Custom Clicker

custom-clicker

Author

Mahmoud Haj Ali - GitHub

Mahmoud Haj Ali GitHub avatar
GitHub 작성자

Mahmoud Haj Ali ↗

Syria-Aleppo
언어C++DartCMakeHTMLCSwiftKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개

  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗