zeba_academy_widget_snapshots

A powerful, lightweight Flutter package to capture widget screenshots offline, with optional blur support and local storage.


โœจ Features

  • ๐Ÿ“ธ Capture any Flutter widget as an image
  • ๐Ÿ’พ Save snapshots locally (offline)
  • ๐ŸŒซ๏ธ Optional blur for sensitive content
  • ๐Ÿ“‚ Retrieve saved snapshots
  • โšก No API, no cloud, fully offline

๐Ÿš€ Getting Started

Add the package to your pubspec.yaml:

dependencies:
  zeba_academy_widget_snapshots: ^0.0.1

๐Ÿง‘โ€๐Ÿ’ป Usage

1. Import

import 'package:zeba_academy_widget_snapshots/zeba_academy_widget_snapshots.dart';

2. Wrap Your Widget

final GlobalKey repaintKey = GlobalKey();

SnapshotWidget(
  repaintKey: repaintKey,
  child: Container(
    padding: const EdgeInsets.all(20),
    color: Colors.blue,
    child: const Text(
      "Capture Me!",
      style: TextStyle(color: Colors.white),
    ),
  ),
)

3. Capture & Save

final controller = SnapshotController(repaintKey);

final path = await controller.save(
  blur: true,
);

print("Saved at: $path");

๐Ÿง  API Overview

SnapshotController

Method Description
capture() Captures widget as Uint8List
save() Saves snapshot locally

SnapshotWidget

Wrap any widget to make it capturable.


๐Ÿ“‚ Storage

Snapshots are saved in:

  • Application Documents Directory
  • PNG format

๐ŸŒซ๏ธ Blur Support

Enable blur for sensitive UI:

await controller.save(blur: true);

๐Ÿ“Œ Use Cases

  • ๐Ÿ“š Study notes & revision snapshots
  • ๐Ÿ“Š Progress tracking
  • ๐Ÿ” Masking sensitive UI before sharing
  • ๐Ÿงช Debugging UI states

๐Ÿ› ๏ธ Roadmap

  • ๐Ÿ“ธ Snapshot gallery viewer
  • ๐Ÿท๏ธ Notes & tagging system
  • ๐Ÿ“„ Export to PDF
  • ๐Ÿ”— Share snapshots

๐Ÿ“œ License (GPL-3.0)

This project is licensed under the GNU General Public License v3.0.

You are free to:

  • Use
  • Modify
  • Distribute

Under the condition that:

  • You disclose source code
  • Use the same license

Full License: https://www.gnu.org/licenses/gpl-3.0.en.html


๐Ÿ‘จโ€๐Ÿ’ป About Me

โœจ Iโ€™m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on Linkedin


๐Ÿš€ Your all-in-one no-bloat hub!

๐Ÿš€ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! ๐Ÿ’ปโœจ

Zeba Academy is a learning platform dedicated to coding, technology, and development. โžก Visit our main site: zeba.academy โžก Explore hands-on courses and resources at: code.zeba.academy โžก Check out our YouTube for more tutorials: zeba.academy โžก Follow us on Instagram: zeba.academy


๐Ÿ™Œ Contributing

Contributions are welcome!

  • Fork the repo
  • Create a feature branch
  • Submit a pull request

โญ Support

If you like this package:

  • โญ Star the repo
  • ๐Ÿง‘โ€๐Ÿ’ป Share with others
  • ๐Ÿ› Report issues

Thank you for visiting! ๐Ÿš€