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

GitHub 저장소mhrst/bottom_sheet_bar

bottom_sheet_bar

하단 시트로 확장되는 도구 모음

bottom_sheet_bar 프로젝트 이미지
스타
16
포크
4
최근 푸시(UTC)
2025. 6. 13.
프로젝트 상태
활성

원본 README

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

bottom_sheet_bar

A toolbar that aligns to the bottom of a widget and expands into a bottom sheet.

Short content Long content Scrollable content
import 'package:bottom_sheet_bar/bottom_sheet_bar.dart';

BottomSheetBar(
    expandedBuilder: (scrollController) => ListView.builder(
        controller: scrollController, 
        itemBuilder: (context, index) => ListTile(title: index.toString()),
        itemCount: 50,
    ),
    collapsed: Text('Collapsed toolbar widget'),
    body: Text('Content overlayed by toolbar and bottom sheet'),
);

BottomSheetBar

Required
  • Widget body - The toolbar will be aligned to the bottom of the body Widget. Padding equal to height is added to the bottom of this widget.
  • Function(ScrollController) expandedBuilder - A function to build the widget displayed when the bottom sheet is expanded. If the expanded content is scrollable, pass the provided ScrollController to the scrollable widget.
Optional
  • Widget collapsed - A Widget to be displayed on the toolbar in its collapsed state
  • BottomSheetBarController controller - A controller can be used to listen to events, and expand and collapse the bottom sheet.
  • Color color - The background color of the toolbar and bottom sheet. Defaults to Colors.white
  • Color backdropColor - The backdrop color that overlays the [body] widget when the bottom sheet is expanded. Defaults to Colors.transparent (no backdrop)
  • BorderRadius borderRadius - Provide a border-radius to adjust the shape of the toolbar
  • BorderRadius borderRadiusExpanded - Provide a border-radius to adjust the shape of the bottom-sheet when expanded
  • List<BoxShadow> boxShadows - Provide shadow decoration to the bottom sheet
  • double height - The height of the collapsed toolbar. Default to kToolbarHeight (56.0)
  • bool isDismissable - If true, the bottom sheet can be dismissed by tapping elsewhere. Defaults to true
  • bool locked - If true, the bottom sheet cannot be opened or closed with a swipe gesture. Defaults to true
  • bool willPopScope - If true, the bottom sheet widget will be wrapped in a WillPopScope widget to handle back-gestures. Defaults to false
  • bool backButtonListener - If true, the bottom sheet widget will be wrapped in a BackButtonListener widget to handle back-gestures. Defaults to false

BottomSheetBarController

A controller used to expand or collapse the bottom sheet of a BottomSheetBar. Listeners can be added to respond to expand and collapse events. The expanded or collapsed state can also be determined through this controller.

  • bool get isCollapsed - Only returns [true] if the bottom sheet if fully collapsed
  • bool get isExpanded - Only returns [true] if the bottom sheet if fully expanded
  • TickerFuture collapse() - Collapse the bottom sheet built by BottomSheetBar.expandedBuilder
  • TickerFuture expand() - Expand the bottom sheet built by BottomSheetBar.expandedBuilder
  • void addListener(Function listener) - Adds a function to be called on every animation frame
  • void removeListener(Function listener) - Removes a previously added listener
  • void dispose() - Removes all previously added listeners
  • void attach(AnimationController animationController) - Used internally to assign the AnimationController created by BottomSheetBar to the controller. Unless you're using advanced animation techniques, you probably won't ever need to use this method.

Example

A quick demonstration can be found in the example directory. To run the example:

flutter run example/main.dart

Matt Hurst GitHub avatar
GitHub 작성자

Matt Hurst ↗

Develop!

@workpailUnited States
언어DartPythonHTMLSwiftKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개

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

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

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

출처 및 관리

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

GitHub Docs — About repositories ↗