パッケージ、リポジトリ、アプリカテゴリを検索

speech_bubble のカバー
パッケージ詳細v0.0.9

speech_bubble

Flutter で会話ボックスをエミュレートするウィジェット。

AndroidiOS
30日間ダウンロード
137
いいね数
30
Pub ポイント
150

パッケージをインストール

flutter pub add speech_bubble

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

チャットインターフェースや会話要素を必要とするUIでよく使われる、会話ボックスの外観を模倣するFlutterウィジェットです。実際の会話ボックスに似た丸みを帯びた先端付きのコンテナでテキストを表示するためのシンプルでカスタマイズ可能な方法を提供します。配置、テールの位置、スタイルなどのさまざまな設定がサポートされており、メッセージアプリやインタラクティブUIに最適です。軽量で、既存のFlutterプロジェクトにスムーズに統合できます。

用途

  • チャットインターフェース
  • ユーザーのフィードバックが表示されます
  • インタラクティブなチュートリアル
  • 通知ポップアップ
  • ゲームのダイアログボックス

主な機能

  • カスタマイズ可能な尾の位置
  • 丸められた角とポインター
  • 柔軟なアラインメントオプション
  • 軽量で統合が簡単
  • テキストスタイルをサポート

適している対象

  • メッセージングアプリ
  • 教育アプリ
  • 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,
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。