sayings 0.0.6
sayings: ^0.0.6 copied to clipboard
A Flutter library providing categorized quotes/sayings with multilingual support.
Sayings #
A lightweight Flutter library providing categorized quotes/sayings, supporting random retrieval by type and language.
中文版 | English
✨ Features #
- 📅 Weekly Quotes - Automatically displays corresponding weekday quotes
- 🌟 Multiple Categories - Life, work, music themed quotes
- 🌍 Multilingual Support - Chinese and English quotes
- 🎲 Random Retrieval - Supports getting random quotes of any type
- ⚡ High Performance - Built-in caching mechanism for fast loading
- 📦 Zero Dependencies - Pure Dart implementation
📦 Installation #
Add to your pubspec.yaml
:
dependencies:
sayings: ^0.0.6
Then run:
flutter pub get
Usage #
Import #
import 'package:sayings/sayings.dart';
Initialize #
final sayingsPlugin = Sayings();
Get Random Saying #
// Get random quote of any type
Saying randomSaying = sayingsPlugin.getRandomSaying(
type: SayingType.work,
language: Language.zh
);
// Get specific type of quote
Saying lifeSaying = sayingsPlugin.getRandomSaying(SayingType.life);
// Get quote content directly
String content = sayingsPlugin.getRandomSayingContent(SayingType.music);
Types #
Supported quote types:
SayingType.week
- Weekday related quotesSayingType.life
- Life related quotesSayingType.work
- Work related quotesSayingType.music
- Music related quotes
License #
MIT License - See LICENSE file.