UI 요소에 도구 설명을 쉽게 추가할 수 있는 가벼운 플러터 패키지입니다. 사용자가 특정 위젯 위로 마우스를 올리거나 탭했을 때 정보성 팝업 텍스트를 표시하는 간단한 API를 제공하여 최소한의 설정으로 사용자 경험을 향상시킵니다. 복잡한 애니메이션이나 스타일링 없이 맥락 기반 안내가 필요한 앱에 적합합니다. 모바일, 웹, 데스크톱을 포함한 모든 주요 플랫폼을 지원합니다.
사용 사례
폼 필드에 컨텍스트 도움말 추가
앱 기능을 사용자에게 안내하기
설명적인 힌트를 통해 접근성 향상
다시보기 툴팁 강화
아이콘에 빠른 정보 표시
상호작용 요소에 대한 피드백 제공
주요 기능
최소 구성
크로스 플랫폼 지원
사용자 정의 가능한 툴팁 표시
터치 및 호버 상호작용을 지원합니다
경량이고 빠름
기존 위젯과의 간편한 통합
적합한 대상
초보자 플러터 개발자
간단한 툴팁이 필요한 앱
접근성 중심 디자인
프로토타입 및 빠른 개발
정보 밀도가 높은 정보 레이아웃을 가진 UI
고려 사항
제한된 고급 애니메이션 옵션
복잡한 레이아웃에서는 도구 설명의 위치를 수동으로 조정해야 할 수도 있습니다
키보드 탐색에 내장된 지원 없음
기본적인 사용 사례에 가장 적합
디자인 시스템과의 일관성을 위해 추가적인 스타일링이 필요할 수 있습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
simple_tooltip
A plugin for creating tooltips with shape of a balloon
You can customize multiple elements
💻 Installation
In the dependencies: section of your pubspec.yaml, add the following line:
/// The [child] which the tooltip will target tofinalWidget child;
/// Sets the tooltip direction/// defaults to [TooltipDirection.up]finalTooltipDirection tooltipDirection;
/// Defines the content that its placed inside the tooltip ballonfinalWidget content;
/// If true, it will display the tool , if false it will hide itfinalboolshow;
/// Sets the content padding/// defautls to: `const EdgeInsets.symmetric(horizontal: 20, vertical: 16),`finalEdgeInsets ballonPadding;
/// sets the duration of the tooltip entrance animation/// defaults to [460] millisecondsfinalDuration animationDuration;
/// [top], [right], [bottom], [left] position the Tooltip absolute relative to the whole screendouble top, right, bottom, left;
/// [minWidth], [minHeight], [maxWidth], [maxHeight] optional size constraints./// If a constraint is not set the size will ajust to the contentdouble minWidth, minHeight, maxWidth, maxHeight;
////// The distance of the tip of the arrow's tip to the center of the targetfinaldouble arrowTipDistance;
////// The length of the Arrowfinaldouble arrowLength;
////// the stroke width of the borderfinaldouble borderWidth;
////// The minium padding from the Tooltip to the screen limitsfinaldouble minimumOutSidePadding;
////// The corder radii of the borderfinaldouble borderRadius;
////// The width of the arrow at its basefinaldouble arrowBaseWidth;
////// The color of the borderfinalColor borderColor;
////// The color of the borderfinalColor backgroundColor;
////// Set a custom list of [BoxShadow]/// defaults to `const BoxShadow(color: const Color(0x45222222), blurRadius: 8, spreadRadius: 2),`finalList<BoxShadow> customShadows;
////// Set a handler for listening to a `tap` event on the tooltip (This is the recommended way to put your logic for dismissing the tooltip)finalFunction() tooltipTap;
////// If you want to automatically dismiss the tooltip whenever a user taps on it, set this flag to [true]/// For more control on when to dismiss the tooltip please rely on the [show] property and [tooltipTap] handler/// defaults to [false]finalbool hideOnTooltipTap;
////// Pass a `RouteObserver` so that the widget will listen for route transition and will hide tooltip when/// the widget's route is not activefinalRouteObserver<PageRoute> routeObserver;
This project is a starting point for a Dart
package,
a library module containing code that can be shared easily across
multiple Flutter or Dart projects.
For help getting started with Flutter, view our
online documentation, which offers tutorials,
samples, guidance on mobile development, and a full API reference.