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

패키지 상세v1.0.5

scrollable

해틱스, 키보드 숨기기 등이 포함된 강력한 스크롤 가능한 위젯 세트입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
1.2천
좋아요
24
Pub 점수
160

패키지 설치

flutter pub add scrollable

패키지 개요

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

scrollable 패키지는 사용자 정의 가능한 스크롤 위젯 세트를 통해 플러터의 스크롤 기능을 향상시킵니다. 내장된 햅틱 피드백, 자동 키보드 닫기 및 플랫폼 간 개선된 스크롤 동작을 포함합니다. 정교한 스크롤 상호작용을 원하는 개발자를 위한 것으로, 안드로이드, iOS, 웹, 맥OS, 윈도우, 리눅스 등 모든 주요 플랫폼을 지원합니다. 이 패키지는 플러터의 기본 ScrollView 컴포넌트를 확장하여 성능이나 유연성을 희생하지 않고 사용자 경험을 향상시키는 추가 기능을 제공합니다.

사용 사례

  • 양식 내 스크롤 상호작용 향상
  • 촉각 피드백을 갖춘 반응형 목록 만들기
  • 키보드를 닫는 스크롤 가능한 인터페이스 만들기
  • 스크롤 가능한 콘텐츠의 접근성 향상
  • 다중 플랫폼에서 부드러운 스크롤링 구현

주요 기능

  • 스크롤 시 진동 피드백
  • 자동 키보드 숨기기
  • 크로스 플랫폼 스크롤 동작
  • 사용자 정의 스크롤 물리학
  • 내장 스크롤 표시기
  • 확장 가능한 위젯 아키텍처

적합한 대상

  • 인터랙티브 스크롤 가능한 UI를 구축하는 개발자
  • 촉각 피드백이 필요한 앱
  • 폼 중심 애플리케이션
  • 다중 플랫폼 Flutter 프로젝트
  • 접근성 중심 디자인

고려 사항

  • Flutter의 스크롤 시스템에 대한 이해가 필요합니다
  • 패키지 크기가 약간 증가할 수 있습니다
  • 기본 사용법 외에 문서가 제한적
  • 간단한 목록 표시용이 아님
  • 사용자 정의 스크롤 컨트롤러와 함께 사용하는 것이 가장 좋습니다

원본 README

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

🔥 A powerful set of scrollable widgets: haptics, keyboard dismissing, and more 🔥

  • Submit an issue here.
  • Create a pull request here.
  • Contact me via email [here](mailto:me@matthewtrent.me).

3 Widgets in this package 📚

💥 ScrollHaptics
  • Applies haptic feedback when its child is scrolled (during scroll & reaching edge of scroll view).
💥 KeyboardDismiss
  • Dismisses the soft-keyboard when its child is scrolled, tapped, or swiped.
💥 ScrollableView
  • The above 2 widgets combined into 1 widget for ease-of-use.

Example Gif 📸

It's hard to display haptics in a gif, but they're there.

Installing 🧑‍🏫

  • Install the package from the pub.
    • flutter pub add scrollable
  • Import the package.
    • import 'package:scrollable/exports.dart';

Quick Start 💨

Simply wrap whatever you want inside the ScrollHaptics, KeyboardDismiss, or ScrollableView widgets, then edit whatever of their properties you want!

Short Examples of the 3 Widgets 📜

For a full example with context, view the examples tab. It shows just the ScrollableView, but it's the same layout for all 3 widgets.

Scroll Haptics

ScrollHaptics

ScrollHaptics(
        // <Assorted Properties Here>
        child: SingleChildScrollView(
          child: Column(
            children: [
              Container(height: 100, width: 100, color: Colors.redAccent),
              Container(height: 100, width: 100, color: Colors.blue),
              Container(height: 100, width: 100, color: Colors.purple),
            ],
          ),
        ),
      );
Keyboard Dismiss

KeyboardDismiss

KeyboardDismiss(
          // <Assorted Properties Here>
        child: SingleChildScrollView(
          child: Column(
            children: [
              Container(height: 100, width: 100, color: Colors.redAccent),
              Container(height: 100, width: 100, color: Colors.blue),
              Container(height: 100, width: 100, color: Colors.purple),
            ],
          ),
        ),
      );
Scrollable View

ScrollableView

ScrollableView(
          // <Assorted Properties Here>
        controller: ScrollController(),
        child: SingleChildScrollView(
          child: Column(
            children: [
              Container(height: 100, width: 100, color: Colors.redAccent),
              Container(height: 100, width: 100, color: Colors.blue),
              Container(height: 100, width: 100, color: Colors.purple),
            ],
          ),
        ),
      );

Properties of the 3 Widgets 📜

Scroll Haptics

ScrollHaptics

Highly reccomended to use ClampingScrollPhysics for the physics of whatever scrollable you're wrapping, as it works best with haptics.

  • child (required): This widget's child.
  • bubbleUpScrollNotifications: Whether the widget should bubble up scroll notifications, or block them.
  • heavyHapticsAtEdgeEnabled: When a scroll reaches the edge, if there should be a haptic effect emitted.
  • hapticEffectAtEdge: Which kind of haptic effect should be emitted when the scroll edge is reached?
  • hapticEffectDuringScroll: Which kind of haptic effect should be emitted during the scroll.
  • distancebetweenHapticEffectsDuringScroll: The distance, in pixels, that should be scrolled before emitting a new haptic scroll effect.
Keyboard Dismiss

KeyboardDismiss

  • child (required): This widget's child.
  • bubbleUpScrollNotifications: Whether the widget should bubble up scroll notifications, or block them.
  • closeKeyboardOnTap: If the keyboard should also be closed just on the widget being tapped.
  • closeKeyboardOnVerticalSwipe: If the keyboard should be closed when a vertical swipe occurs.
  • onKeyboardDismissed: Callback triggered when a dismiss occurs.
Scrollable View

ScrollableView

  • child (required): This widget's child.
  • controller (required): A ScrollController to manage the scrolling of the widget.
  • bubbleUpScrollNotifications: Whether the widget should bubble up scroll notifications, or block them.
  • closeKeyboardOnScroll: Whether the keyboard should be automatically closed on the widget being scrolled.
  • closeKeyboardOnTap: If the keyboard should also be closed just on the widget being tapped.
  • physics: Physics of the scroll view. Highly reccomended to use ClampingScrollPhysics as it works best with haptics.
  • scrollDirection: Direction of the scroll.
  • inlineBottomOrRightPadding: Inline padding of the scroll view. This is a clean substitute to having to add SizedBox widgets inside your scroll view. For the bottom (if vertical) or right (if horizontal) of the scroll view.
  • inlineTopOrLeftPadding: Inline padding of the scroll view. This is a clean substitute to having to add SizedBox widgets inside your scroll view. For the top (if vertical) or left (if horizontal) of the scroll view.
  • padding: Outer padding of the widget.
  • hapticsEnabled: If haptics should be enabled.
  • distancebetweenHapticEffectsDuringScroll: The distance, in pixels, that should be scrolled before emitting a new haptic scroll effect.
  • heavyHapticsAtEdgeEnabled: If the haptics when the edge of the scroll is reached should be enabled or not.
  • hapticEffectAtEdge: Which kind of haptic effect should be emitted when the scroll edge is reached?
  • hapticEffectDuringScroll: Which kind of haptic effect should be emitted during the scroll.
  • primary: Whether this is the primary scroll view associated with the parent PrimaryScrollController.
  • dragStartBehavior: Determines the way that drag start behavior is handled.
  • restorationId: Restoration ID to save and restore the scroll offset of the scrollable.
  • reverse: Whether the scroll view scrolls in the reading direction.
  • closeKeyboardOnVerticalSwipe: If the keyboard should be closed when a vertical swipe occurs.

Additional Info 📣

analytics

카테고리

소스 저장소

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

아직 데이터가 없습니다.