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

speech_bubble 표지
패키지 상세v0.0.9

speech_bubble

Flutter에서 대화창을 에뮬레이트하는 위젯입니다.

AndroidiOS
30일 다운로드
137
좋아요
30
Pub 점수
150

패키지 설치

flutter pub add speech_bubble

패키지 개요

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

채팅 인터페이스나 대화 요소가 필요한 UI에서 흔히 사용되는, 말풍선의 외관을 모방하는 플러터 위젯입니다. 실제 말풍선처럼 둥글고 뾰족한 컨테이너 안에 텍스트를 표시할 수 있는 간단하고 사용자 정의 가능한 방법을 제공합니다. 정렬, 꼬리 위치 및 스타일링과 같은 다양한 구성 옵션을 지원하여 메시징 앱이나 인터랙티브 UI에 적합합니다. 가볍고 기존 플러터 프로젝트에 원활하게 통합됩니다.

사용 사례

  • 채팅 인터페이스
  • 사용자 피드백 표시
  • 인터랙티브 튜토리얼
  • 알림 팝업
  • 게임 대화 상자

주요 기능

  • 사용자 정의 꼬리 위치
  • 둥근 모서리와 포인터
  • 유연한 정렬 옵션
  • 경량이며 통합이 쉬움
  • 텍스트 스타일 지원

적합한 대상

  • 메시징 앱
  • 교육 앱
  • UI 프로토타이핑
  • 간단한 채팅 컴포넌트
  • 소셜 미디어 기능

고려 사항

  • 기본적인 대화창 디자인에 제한됨
  • 내장 애니메이션 지원 없음
  • 동적 콘텐츠 크기 조정을 수동으로 처리해야 합니다
  • 복잡한 대화 시스템에 적합하지 않습니다
  • 작은 화면에서는 꼬리 위치 조정이 필요할 수 있습니다

원본 README

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

SpeechBubble

A flutter widget that emulates a speech bubble.

This widget is modeled after the red Instagram notification popups.

Screenshot

Installing

Dart Pub: https://pub.dartlang.org/packages/speech_bubble#-installing-tab-

  1. Depend on it

    Add this to your package's pubspec.yaml file:

  speech_bubble: ^0.0.5
  1. Install it

    You can install packages from the command line:

$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

  1. Import it

    Now in your Dart code, you can use:

import 'package:speech_bubble/speech_bubble.dart';

Usage

Creates a widget that emulates a speech bubble. Could be used for a tooltip, or as a pop-up notification, etc.

Properties

  • child -> Widget

The child contained by the SpeechBubble.

  • nipLocation -> NipLocation

The location of the nip of the speech bubble. Use the NipLocation enum, either TOP, RIGHT, BOTTOM, or LEFT. The nip will automatically center to the side that it is assigned.

  • color -> Color

The color of the body of the SpeechBubble and nip. Defaultly red.

  • borderRadius -> double

The borderRadius of the SpeechBubble. The SpeechBubble is built with a circular border radius on all 4 corners.

  • height -> double

The explicitly defined height of the SpeechBubble. The SpeechBubble will defaultly enclose its child.

  • width -> double

The explicitly defined width of the SpeechBubble. The SpeechBubble will defaultly enclose its child.

  • padding -> Widget

The padding widget between the child and the edges of the SpeechBubble.

Example Code

import 'package:flutter/material.dart';
import 'package:speech_bubble/speech_bubble.dart';

void main() => runApp(new MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: const Text('Plugin example app'),
        ),
        body: new Center(
          child: new SpeechBubble(
            nipLocation: NipLocation.BOTTOM,
            // child: Column(
            //   mainAxisSize: MainAxisSize.min,
            //   children: <Widget>[
            //     Text("Give your users some guided instruction"),
            //     Text("From the inside of a Speech Bubble")
            //   ],
            // ),
            child: Row(
              mainAxisSize: MainAxisSize.min,
              children: <Widget>[
                Icon(
                  Icons.favorite,
                  color: Colors.white,
                ),
                Padding(
                  padding: const EdgeInsets.all(4.0),
                ),
                Text(
                  "1",
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 18.0,
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

카테고리

소스 저장소

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

아직 데이터가 없습니다.