Pakete, Repositories und App-Kategorien suchen

Cover von speech_bubble
Paketdetailsv0.0.9

speech_bubble

Ein Widget, das einen Sprechblasen-Effekt in Flutter nachahmt.

AndroidiOS
30-Tage-Downloads
137
Likes
30
Pub-Punkte
150

Paket installieren

flutter pub add speech_bubble

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

Ein Flutter-Widget, das das Aussehen einer Sprechblase nachahmt und häufig in Chat-Oberflächen oder Benutzeroberflächen mit kommunikativen Elementen verwendet wird. Es bietet eine einfache und anpassbare Möglichkeit, Text in einem abgerundeten, spitzen Behälter darzustellen, der echten Sprechblasen aus dem Alltag ähnelt. Das Widget unterstützt verschiedene Konfigurationen wie Ausrichtung, Position des Schwanzes und Stil, wodurch es ideal für Messaging-Apps oder interaktive Oberflächen ist. Es ist leichtgewichtig und lässt sich nahtlos in bestehende Flutter-Projekte integrieren.

Anwendungsfälle

  • Chat-Schnittstellen
  • Benutzerfeedback wird angezeigt
  • Interaktive Tutorials
  • Benachrichtigungs-Popups
  • Spiel-Dialogfelder

Hauptmerkmale

  • Anpassbare Schwanzposition
  • Abgerundete Ecken mit Zeiger
  • Flexible Ausrichtungsoptionen
  • Leicht und einfach zu integrieren
  • Unterstützt Textformatierung

Geeignet für

  • Messaging-Apps
  • Lern-Apps
  • UI-Prototypen
  • Einfache Chat-Komponenten
  • Soziale Medien-Funktionen

Hinweise

  • Beschränkt auf grundlegende Sprechblasen-Design
  • Keine integrierte Animationsunterstützung
  • Benötigt manuelle Handhabung der dynamischen Größenanpassung
  • Nicht geeignet für komplexe Dialogsysteme
  • Die Position der Schwanzspitze muss möglicherweise auf kleinen Bildschirmen angepasst werden

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

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,
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

Kategorien

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.