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

slide_to_confirm 표지
패키지 상세v1.1.0

slide_to_confirm

사용자가 슬라이더를 100%까지 스ไล드할 때 콜백을 활성화하는 슬라이더입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
4.6천
좋아요
150
Pub 점수
140

패키지 설치

flutter pub add slide_to_confirm

패키지 개요

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

사용자가 슬라이더를 완전히 100%까지 스와이프했을 때 콜백을 트리거하도록 설계된 사용자 정의 가능한 슬라이더 위젯을 제공하는 플러터 패키지입니다. 항목 삭제나 폼 제출과 같은 작업을 확인할 때 일반적으로 사용되며, 의도적인 제스처를 요구함으로써 사용자 인터랙션을 향상시킵니다. 부드러운 애니메이션을 지원하며, 사용자 지정 색상, 크기 및 레이블로 스타일링할 수 있습니다. 안드로이드, iOS, 웹, 맥OS, 윈도우, 리눅스 등 주요 모든 플랫폼에서 작동합니다.

사용 사례

  • 파괴적 조치 확인
  • 제출 전 사용자 확인
  • 폼 상호작용 향상
  • 의도하지 않은 탭 방지
  • 상호작용 피드백 추가
  • 사용자 정의 확인 제스처

주요 기능

  • 완전한 100% 슬라이드 활성화
  • 사용자 지정 가능한 색상 및 크기
  • 완료 시 콜백
  • 부드러운 애니메이션
  • 크로스 플랫폼 지원
  • 사용자 정의 가능한 레이블 텍스트

적합한 대상

  • 폼 확인
  • 삭제 작업 프롬프트
  • 인터랙티브 UI 요소
  • 사용자 참여 기능
  • 접근성 향상된 컨트롤
  • 간단하지만 효과적인 제스처 입력

고려 사항

  • 완료하려면 사용자 주의가 필요합니다
  • 접근성 조정이 필요할 수 있습니다
  • 단일 방향으로만 슬라이딩 가능
  • 빠른 입력에 적합하지 않음
  • 시각적 피드백은 명확해야 합니다
  • 복잡한 레이아웃의 성능 영향

원본 README

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

slide_to_confirm

A customizable slider that will activate a callback when the user slides it to 100%.

Installation

In the dependencies: section of your pubspec.yaml, add the following line:

slide_to_confirm: <latest_version>

Usage

import 'package:slide_to_confirm/slide_to_confirm.dart';

class MyWidget extends StatelessWidget {

    void confirmed(){
        print('Slider confirmed!');
    }

    Widget build(BuildContext context) {
        return ConfirmationSlider(
            onConfirmation: () => confirmed(),
        );
    }
}

Properties

  • height double: Height of the slider. Defaults to 70.
  • width double: Width of the slider. Defaults to 300.
  • backgroundColor Color: The color of the background of the slider. Defaults to Colors.white.
  • backgroundColorEnd Color: The color of the background of the slider when it has been slide to the end. By giving a value here, the background color will gradually change from backgroundColor to backgroundColorEnd when the user slides. Is not used by default.
  • foregroundColor Color: The color of the moving element of the slider. Defaults to Colors.blueAccent.
  • iconColor Color: The color of the icon on the moving element if icon is IconData. Defaults to Colors.white.
  • sliderButtonContent Widget or : The icon widget used on the moving element of the slider. Defaults to Icon(Icons.chevron_right).
  • shadow BoxShadow: The shadow below the slider. Defaults to BoxShadow(color: Colors.black38, offset: Offset(0, 2),blurRadius: 2,spreadRadius: 0,).
  • text String: The text showed below the foreground. Used to specify the functionality to the user. Defaults to "Slide to confirm".
  • textStyle TextStyle: The style of the text. Defaults to TextStyle(color: Colors.black26, fontWeight: FontWeight.bold,).
  • onConfirmation VoidCallback: The callback when slider is completed. This is the only required field.
  • onTapDown VoidCallback: The callback when slider is pressed.
  • onTapUp VoidCallback: The callback when slider is release.
  • foregroundShape BorderRadius: The shape of the foreground (the moving element of the slider). Defaults to a circular border radius.
  • backgroundShape BorderRadius: The shape of the background of the slider. Defaults to a circular border radius.
  • stickToEnd bool: Bool that indicates if stick or not the cursor at end of slide

Example

View the Flutter app in the example directory to see a working example of how to use and implement the slider.

Screenshots

Slider Gif

Slider Gif

Slider Gif

Slider Gif

Slider Gif

카테고리

소스 저장소

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

아직 데이터가 없습니다.