flutter_typing_ai 1.0.2
flutter_typing_ai: ^1.0.2 copied to clipboard
A smart Flutter widget that simulates human-like typing with typos, markdown, sound, and more.
๐ง flutter_typing_ai #
A sophisticated Flutter widget that mimics natural human typing with adjustable delays, optional typos simulation, Markdown support, and sound effects โ ideal for chatbots, interactive stories, and AI assistants.
โจ Features #
- โฑ๏ธ Realistic typing speed with random delays between characters.
- ๐ Supports stream-based typing (
Stream<String>
). - ๐งพ Markdown support (bold, italics, code, etc.).
๐ Getting Started #
1. Add the dependency #
dependencies:
flutter_typing_ai: ^1.0.2
2. Import it #
import 'package:flutter_typing_ai/flutter_typing_ai.dart';
3. Example #
// Static text typing
TypingText(
text: "Hello, I type like a real human... ๐ค",
style: TextStyle(fontSize: 20),
useMarkdown: false,
)
// Stream-based typing
TypingText(
textStream: yourStreamOfText,
useMarkdown: true,
)
๐ Parameters #
Parameter | Type | Default | Description |
---|---|---|---|
text |
String? |
null |
The static text to be typed out character by character. |
textStream |
Stream<String>? |
null |
A stream of text chunks to type dynamically, useful for live updates. |
style |
TextStyle |
- | Text style to apply to the typed text. |
useMarkdown |
bool |
false |
Enables Markdown rendering for rich text formatting (bold, italic, code, etc.). |
minDelay |
Duration |
Duration(milliseconds: 30) |
Minimum delay between typing each character, to simulate typing speed variance. |
maxDelay |
Duration |
Duration(milliseconds: 150) |
Maximum delay between typing each character, to simulate typing speed variance. |
๐ License #
MIT License ยฉ 2025 Rezaqi Adib
๐ฆ Example App #
Check out the full example in the example
folder for a complete demo.
๐ก Use Cases #
- ๐ค Chatbots & AI Assistants
- ๐ Storytelling / interactive fiction
- ๐งช Typing effects in tutorials or onboarding
- ๐ฎ Narrative games
๐ ๏ธ Contributing #
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.