flutter_thirukural 1.3.1 copy "flutter_thirukural: ^1.3.1" to clipboard
flutter_thirukural: ^1.3.1 copied to clipboard

A Flutter package to integrate Thirukural with full access to all 1330 kurals, dynamic range search, and self-contained categorized UI views.

Flutter Thirukural #

Pub Version License Platform Support

Thirukural is a classic Tamil sangam literature consisting of 1330 kurals (couplets) divided into 133 chapters and 3 sections, authored by the great Tamil poet Thiruvalluvar.

This package provides beautiful, responsive, and self-contained widgets to display Kurals in your Flutter applications—perfect for apps focused on Tamil culture, literature, or daily wisdom.

Live Web App Demo: flutter-thirukural.netlify.app


Features #

  • Kural of the Day - Display daily wisdom based on the date.
  • Kural by Number - Fetch and search any specific Kural (1-1330).
  • All Kurals - Browse all 1330 Kurals with pagination and search.
  • Kurals in Range - View and display Kurals within a custom number range.
  • Browse by Section - Navigate through the 3 main sections (Paals).
  • Tamil Chapter Names - Browse all 133 chapters in Tamil.
  • English Chapter Names - Browse all 133 chapters in English.
  • Responsive Layouts - Adapts beautifully to mobile, tablet, and desktop viewports.
  • Pull-to-Refresh & Retry - Easy recovery from offline/network issues with integrated retry buttons.
  • Zero-Setup Integration - Completely self-contained widgets; no State Management (like Riverpod or Provider) wrapper needed!

Installation #

Add flutter_thirukural to your pubspec.yaml:

dependencies:
  flutter_thirukural: ^1.3.0

Then run:

flutter pub get

Example and Usage #

For a complete runnable application demonstrating all the widgets and web routing support, please check the example/main.dart file.

Below are the code snippets to integrate each widget based on your feature requirements:

Displays all 1,330 Kurals with search capabilities and page-by-page navigation.

import 'package:flutter/material.dart';
import 'package:flutter_thirukural/flutter_thirukural.dart';

class AllKuralsView extends StatelessWidget {
  const AllKuralsView({super.key});

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: AllThirukurals(),
    );
  }
}

2. Kural of the Day #

Displays the daily wisdom couplet based on a specific date (format: dd-MM-yyyy).

import 'package:flutter/material.dart';
import 'package:flutter_thirukural/flutter_thirukural.dart';

class KuralOfTheDayView extends StatelessWidget {
  const KuralOfTheDayView({super.key});

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: ThirukuralOfTheDay(
        date: "14-07-2026", // Format: dd-MM-yyyy
      ),
    );
  }
}

3. Fetch Kural by Number #

Directly search and display a specific Kural couplet by its index (1 to 1330).

import 'package:flutter/material.dart';
import 'package:flutter_thirukural/flutter_thirukural.dart';

class KuralByNumberView extends StatelessWidget {
  const KuralByNumberView({super.key});

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: ThirukuralByNumber(
        kuralNumber: 1, // Any number between 1 and 1330
      ),
    );
  }
}

4. Kurals in a Custom Range #

Ideal for displaying a custom set of couplets or a specific group.

import 'package:flutter/material.dart';
import 'package:flutter_thirukural/flutter_thirukural.dart';

class KuralsInRangeView extends StatelessWidget {
  const KuralsInRangeView({super.key});

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: ThirukuralsInRange(
        from: 1,
        to: 10, // Must be greater than 'from' and within 1-1330
      ),
    );
  }
}

5. Browse by Section (Paal) #

Allows users to browse through the 3 primary sections: Aram (Virtue), Porul (Wealth), and Inbam (Love).

import 'package:flutter/material.dart';
import 'package:flutter_thirukural/flutter_thirukural.dart';

class SectionsView extends StatelessWidget {
  const SectionsView({super.key});

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: ThirukuralBySectionNames(),
    );
  }
}

6. Browse by Chapters (Tamil & English) #

Perfect for looking up Kurals categorized by their 133 chapters in either Tamil or English.

Tamil Chapters:

import 'package:flutter/material.dart';
import 'package:flutter_thirukural/flutter_thirukural.dart';

class TamilChaptersView extends StatelessWidget {
  const TamilChaptersView({super.key});

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: ThirukuralByTamilChapterNames(),
    );
  }
}

English Chapters:

import 'package:flutter/material.dart';
import 'package:flutter_thirukural/flutter_thirukural.dart';

class EnglishChaptersView extends StatelessWidget {
  const EnglishChaptersView({super.key});

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: ThirukuralByEnglishChapterNames(),
    );
  }
}

Screenshots and Live Preview #

Interactive preview of the application is available at: flutter-thirukural.netlify.app

Home Screen All Thirukurals Kural of the Day
Home Screen All Thirukurals Kural of the Day
Kurals in Range Kural by Number Sections
Kurals in Range Kural by Number Sections
Tamil Chapters English Chapters
Tamil Chapters English Chapters

API Reference #

ThirukuralOfTheDay #

Parameter Type Required Description
date String? Yes Date in dd-MM-yyyy format

ThirukuralByNumber #

Parameter Type Required Description
kuralNumber int? Yes Kural number (1-1330)

ThirukuralsInRange #

Parameter Type Required Description
from int? Yes Start of range (1-1329)
to int? Yes End of range (2-1330)

Troubleshooting #

Widget shows loading indefinitely #

This can happen due to:

  1. No internet connection: The package fetches Kural data dynamically from a backend API.
  2. API Cold Start: The API server is hosted on a free cloud tier and may take ~30 seconds to wake up on the very first request.

Note: All views include standard retry layouts with retry buttons so users can recheck availability smoothly.


Maintainer #

Sanjay Prasath Ganesh

4
likes
140
points
144
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter package to integrate Thirukural with full access to all 1330 kurals, dynamic range search, and self-contained categorized UI views.

Topics

#flutter #thirukural #tamil #kural

License

MIT (license)

Dependencies

flutter, google_fonts, http, intl, responsive_framework

More

Packages that depend on flutter_thirukural