Zeba Books Poetry Engine
Advanced Flutter typography engine for rendering classical and modern poetry with scholarly layout support.
✨ Overview
Zeba Books Poetry Engine is a Flutter UI library designed to display poetry with high‑quality typographic control. It provides specialized widgets for verse layout, multilingual text rendering, and structured poetic formatting used in classical literature, translations, and modern poetry apps.
This package focuses on readability, rhythm preservation, and academic presentation standards.
🚀 Features
- ✅ Hanging indent poetry lines
- ✅ Side‑by‑side stanza translation layout
- ✅ Automatic line numbering overlay
- ✅ Dynamic RTL / LTR direction detection
- ✅ Caesura and mid‑line spacing support
- ✅ Clean Flutter widget API
- ✅ Lightweight and customizable
📦 Installation
Add the package using Flutter:
flutter pub add zeba_books_poetry_engine
Or manually inside pubspec.yaml:
dependencies:
zeba_books_poetry_engine: ^1.0.0
Then run:
flutter pub get
🧩 Core Widgets
PoetryLine
Displays a single poetic line with automatic text direction detection and hanging indent support.
PoetryLine(
text: "To be || or not to be",
)
Capabilities
- Hanging indentation
- RTL/LTR auto switching
- Caesura spacing support
Stanza
Creates structured poetry blocks and supports side‑by‑side translation layouts.
Stanza(
original: const [
PoetryLine(text: "To be || or not to be"),
],
translation: const [
PoetryLine(text: "होना या न होना"),
],
)
LineNumberOverlay
Automatically overlays line numbers at a chosen interval.
LineNumberOverlay(
interval: 5,
lines: const [
PoetryLine(text: "Line 1"),
PoetryLine(text: "Line 2"),
],
)
CaesuraText
Adds visual spacing for poetic pauses using || markers.
CaesuraText(
text: "To be || or not to be",
)
🌍 Multilingual Support
The engine automatically detects writing direction based on characters:
- English → LTR
- Arabic / Urdu / Persian → RTL
- Mixed scripts supported
No manual configuration required.
🧪 Example App
A complete working example is available in the /example directory.
Run it with:
cd example
flutter run
📚 Use Cases
- Poetry reader apps
- Digital books & EPUB viewers
- Religious or classical literature
- Bilingual education apps
- Scholarly publications
⚙️ Customization
All widgets accept Flutter styling options including:
TextStyle- spacing adjustments
- layout composition
You can freely compose widgets with existing Flutter UI components.
🤝 Contributing
Contributions are welcome!
- Fork the repository
- Create a feature branch
- Submit a pull request
📄 License
MIT License
👤 Author
Developed by Zeba Academy.
⭐ Support
If you find this package useful, consider giving it a star on GitHub and sharing feedback to help improve future releases.
Libraries
- zeba_books_poetry_engine
- Zeba Books Poetry Engine