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 quotes
  • SayingType.life - Life related quotes
  • SayingType.work - Work related quotes
  • SayingType.music - Music related quotes

License

MIT License - See LICENSE file.