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

A Flutter package for creating and exporting customizable certificates as PNG/PDF with dynamic data and templates.

certify_me #

A Flutter package for creating and exporting customizable certificates as PNG/PDF with dynamic data and templates.

Features #

  • Create beautiful certificates with customizable templates
  • Fill in certificate data dynamically (recipient name, course title, descriptions, etc.)
  • Export certificates as PNG or PDF
  • Share certificates directly from your app
  • Three built-in certificate templates (Elegant, Modern, Minimalist)
  • Support for custom templates and layouts
  • Generate unique certificate IDs
[./img/Screenshot_1747916803.png]

Installation #

dependencies:
  certify_me: ^0.1.0

Run flutter pub get to install the package.

Usage #

Basic Usage #

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

void main() {
  runApp(const MaterialApp(home: CertificateTestPage()));
}

class CertificateTestPage extends StatefulWidget {
  const CertificateTestPage({super.key});

  @override
  State<CertificateTestPage> createState() => _CertificateTestPageState();
}

class _CertificateTestPageState extends State<CertificateTestPage> {
  late CertificateGenerator generator;
  late Widget certificateWidget;
  String? pngPath;
  String? pdfPath;

  @override
  void initState() {
    super.initState();
    final certificateData = CertificateData(
      recipientName: 'John Doe',
      courseTitle: 'Flutter Development Masterclass',
      description: 'Successfully completed 40 hours of intensive Flutter training',
      issueDate: DateTime.now(),
      issuerName: 'Jane Smith',
      issuerTitle: 'Lead Instructor',
      certificateId: CertificateGenerator.generateCertificateId(),
    );

    final certificateTemplate = CertificateTemplate.elegant();

    generator = CertificateGenerator(
      data: certificateData,
      template: certificateTemplate,
    );

    certificateWidget = generator.buildPreview();

    generateFiles();
  }

  Future<void> generateFiles() async {
    pngPath = await generator.exportAsPng();
    pdfPath = await generator.exportAsPdf();
    setState(() {}); // refresh the UI
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Certificate Preview')),
      body: SingleChildScrollView(
        padding: const EdgeInsets.all(16),
        child: Column(
          children: [
            certificateWidget,
           
          ],
        ),
      ),
    );
  }
}

1
likes
0
points
23
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for creating and exporting customizable certificates as PNG/PDF with dynamic data and templates.

Repository (GitHub)
View/report issues

Topics

#certificate #export #pdf #image #generator

Documentation

Documentation

License

unknown (license)

Dependencies

flutter, image, intl, path, path_provider, pdf, printing, share_plus, uuid

More

Packages that depend on certify_me