invoice_kit 0.1.0
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 infoParty: Business/customer details with optional GST, bank, UPI infoLineItem: Line items with quantity, unit price, discounts, CGST/SGST/IGSTTotals: Auto-calculated totals with tax breakdownPayment: Payment method and status trackingTax: Tax breakdown model
Core API #
InvoiceGenerator: Main public API for generate, download, share, print, saveToDevice, previewTemplateConfig: Customization (colors, fonts, logo, signature, currency, locale)PlaceholderResolver: {{dot.notation.paths}} with {{formatters | currency | date:pattern}}
Built-in Templates #
- ClassicTemplate: Detailed B2B invoice with GST columns, bank details, signature
- ModernTemplate: Clean minimalist design with color sidebar
- CompactTemplate: Event/retail invoice matching City Event reference design
- ThermalTemplate: 80mm thermal receipt for POS systems
- JsonTemplate: Fully dynamic JSON-driven templates with validation
Utilities #
CurrencyFormatter: Multi-currency, multi-locale (default en_IN)DateFormatter: Localized date formatting with custom patternsNumberFormatter: Indian (1,23,456.78) and international (123,456.78) number formatsColorUtils: Hex โ PdfColor conversion with lighten/darken utilitiesFontLoader: Google Fonts (Roboto, Noto Sans) with auto-Unicode detectionQrHelper: 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 generationprinting: ^5.12.0- Cross-platform print, save, shareintl: ^0.19.0- Localization and formattingpath_provider: ^2.1.2- Cross-platform file pathsbarcode_widget: ^2.0.4- QR codes and barcodes