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

simple_tooltip 표지
패키지 상세v1.2.0

simple_tooltip

툴팁을 생성하는 간단한 라이브러리

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
5.6천
좋아요
78
Pub 점수
130

패키지 설치

flutter pub add simple_tooltip

패키지 개요

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

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:

dependencies:
  simple_tooltip: <latest version>

Usage

Basic

You can get started really simple, just add

Basic

SimpleTooltip(
        tooltipTap: () {
        print("Tooltip tap");
        },
        animationDuration: Duration(seconds: 3),
        show: true,
        tooltipDirection: TooltipDirection.up,
        child: Container(
        width: 200,
        height: 120,
        child: Placeholder(),
        ),
        content: Text(
        "Some text example!!!!",
        style: TextStyle(
            color: Colors.black,
            fontSize: 18,
            decoration: TextDecoration.none,
        ),
        ),
    ),

Full Api

/// The [child] which the tooltip will target to
  final Widget child;

  /// Sets the tooltip direction
  /// defaults to [TooltipDirection.up]
  final TooltipDirection tooltipDirection;

  /// Defines the content that its placed inside the tooltip ballon
  final Widget content;

  /// If true, it will display the tool , if false it will hide it
  final bool show;

  /// Sets the content padding
  /// defautls to: `const EdgeInsets.symmetric(horizontal: 20, vertical: 16),`
  final EdgeInsets ballonPadding;

  /// sets the duration of the tooltip entrance animation
  /// defaults to [460] milliseconds
  final Duration animationDuration;

  /// [top], [right], [bottom], [left] position the Tooltip absolute relative to the whole screen
  double top, right, bottom, left;

  /// [minWidth], [minHeight], [maxWidth], [maxHeight] optional size constraints.
  /// If a constraint is not set the size will ajust to the content
  double minWidth, minHeight, maxWidth, maxHeight;

  ///
  /// The distance of the tip of the arrow's tip to the center of the target
  final double arrowTipDistance;

  ///
  /// The length of the Arrow
  final double arrowLength;

  ///
  /// the stroke width of the border
  final double borderWidth;

  ///
  /// The minium padding from the Tooltip to the screen limits
  final double minimumOutSidePadding;

  ///
  /// The corder radii of the border
  final double borderRadius;

  ///
  /// The width of the arrow at its base
  final double arrowBaseWidth;

  ///
  /// The color of the border
  final Color borderColor;

  ///
  /// The color of the border
  final Color backgroundColor;

  ///
  /// Set a custom list of [BoxShadow]
  /// defaults to `const BoxShadow(color: const Color(0x45222222), blurRadius: 8, spreadRadius: 2),`
  final List<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)
  final Function() 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]
  final bool hideOnTooltipTap;

  ///
  /// Pass a `RouteObserver` so that the widget will listen for route transition and will hide tooltip when
  /// the widget's route is not active
  final RouteObserver<PageRoute> routeObserver;

Screenshots

Animated
This plugin was inspired by super_tooltip

Getting Started

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.

카테고리

소스 저장소

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

아직 데이터가 없습니다.