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

패키지 상세v0.5.6

keyboard_visibility

Android 및 iOS에서 소프트 키보드 표시 상태를 확인하기 위한 Flutter 플러그인입니다.

30일 다운로드
735
좋아요
122
Pub 점수
35

패키지 설치

flutter pub add keyboard_visibility

패키지 개요

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

keyboard_visibility 패키지는 Android 및 iOS 기기에서 소프트 키보드의 가시성 상태를 감지할 수 있는 Flutter 플러그인입니다. 앱이 동적으로 반응할 수 있도록 키보드 표시/숨김 이벤트를 듣는 간단한 API를 제공합니다. 예를 들어 레이아웃을 조정하거나 콘텐츠를 화면에 보이게 스크롤할 수 있습니다. 폼이나 채팅 인터페이스와 같이 사용자 입력에 시각적 피드백이 필요한 경우 특히 유용합니다. 이 플러그인은 최소한의 설정으로 플랫폼 간에 원활하게 작동하며 반응형 UI에 이상적입니다.

사용 사례

  • 폼 입력 처리
  • 채팅 앱 UI 조정
  • 동적 레이아웃 크기 조정
  • 포커스된 필드로 스크롤
  • 반응형 사용자 인터페이스

주요 기능

  • 실시간 키보드 상태 감지
  • 크로스 플랫폼 지원 (Android 및 iOS)
  • 간단한 이벤트 리스너 API
  • 최소 구성
  • FocusNode 및 TextEditingController와 호환됩니다

적합한 대상

  • 양식 중심 앱을 개발하는 개발자
  • 채팅 또는 메시징 애플리케이션
  • 동적 키보드 인식 레이아웃을 필요로 하는 UI
  • 반응형 입력 처리가 필요한 앱
  • 플러터 초보자가 플랫폼별 기능 탐색하기

고려 사항

  • 웹 플랫폼에서 작동하지 않습니다
  • 적절한 이벤트 리스너 관리가 필요합니다
  • 복잡한 UI 전환을 위해 추가적인 로직이 필요할 수 있습니다
  • 키보드 표시 여부에만 제한되며 크기나 애니메이션은 아님
  • 내장 애니메이션 또는 전환 없음

원본 README

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

keyboard_visibility

Notification service for soft-keyboard visibility

Usage

Add the dependency to your pubspec.yaml file in the root folder of your project. Look for the 'dependencies:'-line and add the following line after this line:

keyboard_visibility: any

or

keyboard_visibility: ^[CURRENT VERSION NUMBER]

(Please note that the two spaces in the beginning of the line are important) Run 'flutter packages get' in your root folder after saving the pubspec.yaml file. For additional documentation about the pubspec.yaml file please refer to the official flutter documentation using packages

Import package:keyboard_visibility/keyboard_visibility.dart, instantiate KeyboardVisibilityNotification and use the Android and iOS notifications to get events about changes of the visibility of the soft-keyboard

The best practice to call the addNewListener function is inside the initState function as in the following example:

import 'package:keyboard_visibility/keyboard_visibility.dart';

@protected
void initState() {
  super.initState();

  KeyboardVisibilityNotification().addNewListener(
    onChange: (bool visible) {
      print(visible);
    },
  );
}

Also check out the example included with the package

Getting Started

For help getting started with Flutter, view the following online documentation.

카테고리

소스 저장소

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