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

패키지 상세v2.0.4

keyboard_service

키보드 가시성 / (자동) 숨기기 패키지, 네이티브 플러그인 필요 없음

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
1.1천
좋아요
43
Pub 점수
160

패키지 설치

flutter pub add keyboard_service

패키지 개요

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

다양한 플랫폼에서 키보드의 표시 여부 및 자동 닫힘을 관리하는 Flutter 패키지로, 네이티브 플러그인 없이도 작동합니다. 키보드가 열렸는지 닫혔는지를 감지하고 프로그래밍 방식으로 숨길 수 있는 간단한 크로스플랫폼 솔루션을 제공합니다. 폼과 입력 중심 인터페이스에서 사용자 경험을 개선하기 위해 이상적이며, 부드러운 키보드 상호작용을 보장합니다. 이 패키지는 Android, iOS, Web, macOS, Windows, Linux에서 원활하게 작동하여 현대적인 Flutter 애플리케이션에 유연한 선택지입니다.

사용 사례

  • 폼 입력 처리
  • 포커스 변경 시 자동으로 키보드 닫기
  • 채팅 앱의 사용자 경험 개선
  • UI 내 키보드 겹침 처리
  • 반응형 레이아웃 조정
  • 동적 폼 필드 관리

주요 기능

  • 크로스 플랫폼 호환성
  • 원격 플러그인 필요 없음
  • 키보드 상태 감지
  • 프로그래밍적 키보드 숨기기
  • 경량이며 통합이 쉬움
  • 모든 주요 데스크톱 및 모바일 플랫폼을 지원합니다

적합한 대상

  • 다중 플랫폼 앱을 개발하는 개발자
  • 복잡한 입력 폼을 가진 앱
  • 채팅 또는 메시지 인터페이스
  • 반응형 키보드 처리가 필요한 UI
  • 플랫폼별 코드를 피하는 팀

고려 사항

  • 웹에서 모든 에지 케이스를 지원하지 않을 수 있습니다
  • 키보드 동작에 대한 사용자 지정이 제한적
  • Flutter의 내장 키보드 API에 의존합니다
  • 고급 키보드 사용자 정의에 적합하지 않음
  • 중첩 스크롤 뷰에서 신중한 처리가 필요합니다

원본 README

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

keyboard_service

Keyboard visibility / (auto-) dismiss package without the need of native plugin

Watch on GitHub Star on GitHub pub package

Getting Started

Use it for example when you want to automatically dimiss the on-screen keyboard when tapped outside of textfield. And if you want know if the on-screen keyboard is visible and/or want to explicitly dismiss it.

There are 2 classes

  • 'KeyboardService': Check if keyboard is visible and dismiss keyboard.
  • 'KeyboardAutoDismiss': A widget that wraps a Scaffold widget for automatically dismissing the keyboard.

Also see example project

Wrap your top scaffold:

return KeyboardAutoDismiss(
        scaffold: Scaffold(
            appBar: AppBar(
                title: Text('Keyboard Service Example'),
            ),
      ...
        ),
    );

Use the service class if needed:

// Use method below to dismiss the keyboard
KeyboardService.dismiss();

// Use the optional BuildContext parameter to remove focus of a TextField
KeyboardService.dismiss(unfocus: context);

// Check if the keyboard is visible
KeyboardService.isVisible(context);

License

This project is licensed under the MIT License - see the license file for details.

카테고리

소스 저장소

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

아직 데이터가 없습니다.