invoice_kit 0.1.0 copy "invoice_kit: ^0.1.0" to clipboard
invoice_kit: ^0.1.0 copied to clipboard

Generate customizable invoice, bill, and receipt PDFs in Flutter with multiple templates, JSON-driven layouts, GST support, QR codes, and cross-platform export.

0.1.0 #

Initial production release of invoice_kit.

Features #

  • ๐ŸŽจ 5 built-in templates: Classic (B2B with GST), Modern (minimalist), Compact (events/retail), Thermal (80mm POS), JSON-driven (fully dynamic)
  • ๐Ÿ“‹ Dual data API: Strongly-typed Invoice models OR raw JSON InvoiceData for server-driven flows
  • ๐Ÿ’ฐ GST-ready with CGST/SGST/IGST breakdown, multi-currency (default INR), multi-locale number formatting
  • ๐Ÿ”ค Full Unicode support (โ‚น, Hindi, Tamil, Arabic, Chinese, etc.) via Google Fonts (Roboto, Noto Sans)
  • ๐Ÿ“ฑ QR code generation for UPI payment links and other payment methods
  • ๐Ÿ–จ๏ธ Cross-platform PDF actions: generate, download, share, print, save to device
  • ๐ŸŒ Cross-platform support: Android, iOS, Web, Windows, macOS, Linux
  • ๐Ÿงฉ Custom templates via InvoiceTemplate interface
  • ๐Ÿ“Š JSON template specifications for white-label and server-driven invoices
  • ๐Ÿ”’ Type-safe Dart with sound null safety
  • ๐Ÿงช Comprehensive unit tests with 100% test pass rate
  • ๐Ÿ“š Complete dartdoc API documentation with examples

Models #

  • Invoice: Strongly-typed invoice with seller, buyer, items, payment info
  • Party: Business/customer details with optional GST, bank, UPI info
  • LineItem: Line items with quantity, unit price, discounts, CGST/SGST/IGST
  • Totals: Auto-calculated totals with tax breakdown
  • Payment: Payment method and status tracking
  • Tax: Tax breakdown model

Core API #

  • InvoiceGenerator: Main public API for generate, download, share, print, saveToDevice, preview
  • TemplateConfig: Customization (colors, fonts, logo, signature, currency, locale)
  • PlaceholderResolver: {{dot.notation.paths}} with {{formatters | currency | date:pattern}}

Built-in Templates #

  1. ClassicTemplate: Detailed B2B invoice with GST columns, bank details, signature
  2. ModernTemplate: Clean minimalist design with color sidebar
  3. CompactTemplate: Event/retail invoice matching City Event reference design
  4. ThermalTemplate: 80mm thermal receipt for POS systems
  5. JsonTemplate: Fully dynamic JSON-driven templates with validation

Utilities #

  • CurrencyFormatter: Multi-currency, multi-locale (default en_IN)
  • DateFormatter: Localized date formatting with custom patterns
  • NumberFormatter: Indian (1,23,456.78) and international (123,456.78) number formats
  • ColorUtils: Hex โ†” PdfColor conversion with lighten/darken utilities
  • FontLoader: Google Fonts (Roboto, Noto Sans) with auto-Unicode detection
  • QrHelper: UPI QR code generation and generic QR/barcode support

Cross-platform #

  • Web: Browser download support
  • Mobile (iOS/Android): Share sheet, app documents directory save
  • Desktop (Windows/macOS/Linux): System save dialog, documents directory

Dependencies #

  • pdf: ^3.10.7 - PDF generation
  • printing: ^5.12.0 - Cross-platform print, save, share
  • intl: ^0.19.0 - Localization and formatting
  • path_provider: ^2.1.2 - Cross-platform file paths
  • barcode_widget: ^2.0.4 - QR codes and barcodes
0
likes
130
points
88
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Generate customizable invoice, bill, and receipt PDFs in Flutter with multiple templates, JSON-driven layouts, GST support, QR codes, and cross-platform export.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

barcode_widget, flutter, intl, path_provider, pdf, printing

More

Packages that depend on invoice_kit