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

bubble_box 표지
패키지 상세v0.5.3

bubble_box

기본 버블, 테두리, 점선, 그라데이션 색상, 각도, 적응형 폭과 높이, 버블 방향, 오프셋 등을 구현하는 강력한 버블 박스입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
1.3천
좋아요
52
Pub 점수
150

패키지 설치

flutter pub add bubble_box

패키지 개요

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

Bubble Box는 경계선, 점선, 그라데이션, 각도, 적응형 크기 조정 및 방향 오프셋과 같은 사용자 정의 가능한 기능을 갖춘 시각적으로 매력적인 버블 모양 컨테이너를 생성할 수 있도록 해주는 Flutter 패키지입니다. Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원합니다. 이 패키지는 툴팁, 배지 또는 인터랙티브 디자인 컴포넌트에 이상적인 동적이고 스타일리시한 UI 요소 구현을 간소화합니다. 직관적인 구성 옵션을 통해 복잡한 커스텀 페인팅 없이도 사용자 인터페이스의 미학을 향상시킵니다.

사용 사례

  • 애니메이션 툴팁 만들기
  • 채팅 버블 디자인
  • 상호작용 가능한 배지 만들기
  • 그라디언트 효과로 UI 개선
  • 반응형 버블 레이아웃 구현

주요 기능

  • 사용자 정의 가능한 버블 방향
  • 적응형 너비 및 높이
  • 그라디언트 색상 지원
  • 점선 테두리
  • 각도 및 오프셋 조정
  • 플랫폼 간 호환성

적합한 대상

  • 시각적 매력이 필요한 UI 디자이너
  • 채팅 인터페이스를 개발하는 개발자
  • 동적 배지 컴포넌트가 필요한 앱
  • 시각 효과에 중점을 둔 프로젝트
  • 크로스플랫폼 모바일 및 웹 앱

고려 사항

  • 과도한 사용 시 성능에 영향을 줄 수 있습니다
  • 신중한 레이아웃 관리가 필요합니다
  • 기본 예제 외에 문서가 제한적
  • 간단한 사각형 형태에는 적합하지 않음

원본 README

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

pub package

English 中文

bubble_box

A powerful bubble box, which implements basic bubble, border, dotted line, gradient color, angle, adaptive width and height, bubble direction, offset, etc.

This project was wrote with pure dart code,which means it's support both iOS As well as Android, web, windows, linux, etc.

Modified a lot of APIs, please pay attention to upgrade

Screenshot

Basic Components

BubbleBox(
    maxWidth: MediaQuery.of(context).size.width * 0.8,
    child: Text('I am a basic component application example'),
)

Customize the border color, width, and component background color

BubbleBox(
    maxWidth: MediaQuery.of(context).size.width * 0.8,
    shape: BubbleShapeBorder(
      border: BubbleBoxBorder(
        color: Colors.blue,
        width: 3,
      ),
      position: const BubblePosition.center(0),
      direction: BubbleDirection.right,
    ),
    backgroundColor: Colors.green.withOpacity(0.8),
    child: Text('I can customize the color and width of the border, the background color of the component, the position of the sharp corner of the bubble and the offset of the sharp corner'),
  )

Define the border as a dashed line and the border color gradient

BubbleBox(
    maxWidth: MediaQuery.of(context).size.width * 0.8,
    gradient: LinearGradient(
      colors: [
        Colors.pink,
        Colors.orange[700],
      ],
    ),
    blendMode: BlendMode.srcATop,
    shape: BubbleShapeBorder(
      border: BubbleBoxBorder(
        gradient: LinearGradient(
          colors: [
            Colors.pink,
            Colors.orange[700],
          ],
        ),
        width: 3,
        style: BubbleBoxBorderStyle.dashed,
      ),
      direction: BubbleDirection.left,
      position: const BubblePosition.start(12),
    ),
    margin: EdgeInsets.all(4),
    elevation: 5,
    shadowColor: Colors.redAccent,
    child: Text(
        'However, I can not only customize the border and sharp corners of the bubble. I can also define the border as a dashed line and a gradient of border color. \nI am adaptive to the content, there is no need to set the width and height. Of course, you can limit the maximum width and height of the component. \nMy content can also be faded. \nIn addition, you may need some shadows, and the shadows may also need some of their own colors.'),
  )

background color gradient

BubbleBox(
    maxWidth: MediaQuery.of(context).size.width * 0.85,
    elevation: 5,
    gradient: LinearGradient(colors: [
      Colors.red,
      Colors.orange[700],
      Colors.orange[500],
    ]),
    shape: BubbleShapeBorder(
      border: BubbleBoxBorder(
        gradient: LinearGradient(
          colors: [
            Colors.pink,
            Colors.orange[700],
          ],
        ),
        color: Colors.blue,
        width: 3,
        style: BubbleBoxBorderStyle.dashed,
      ),
      direction: BubbleDirection.none,
      position: const BubblePosition.start(12),
    ),
    margin: EdgeInsets.all(4),
    child: Text(
      'my background can actually fade',
    ),
  ),

obtuse angle

BubbleBox(
    maxWidth: MediaQuery.of(context).size.width * 0.85,
    shape: BubbleShapeBorder(
      direction: BubbleDirection.left,
      position: const BubblePosition.start(12),
      arrowQuadraticBezierLength: 2,
    ),
    backgroundColor: Color(0xff98E165),
    margin: EdgeInsets.all(4),
    child: Text(
      'We added new obtuse angles so that the triangles are no longer so sharp',
    ),
  ),

enhanced radius

BubbleBox(
    maxWidth: MediaQuery.of(context).size.width * 0.85,
    backgroundColor: Color(0xff98E165),
    margin: EdgeInsets.all(4),
    shape: BubbleShapeBorder(
      radius: BorderRadius.only(
          topRight: Radius.elliptical(30, 15),
          bottomLeft: Radius.elliptical(30, 15)),
    ),
    child: Text(
      'We have made some modifications to the border radius to make it more free',
    ),
  ),

카테고리

소스 저장소

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

아직 데이터가 없습니다.