zeba_academy_code_snippet_manager 1.0.0 copy "zeba_academy_code_snippet_manager: ^1.0.0" to clipboard
zeba_academy_code_snippet_manager: ^1.0.0 copied to clipboard

A Flutter package for storing, searching, tagging, highlighting and copying code snippets.

Zeba Academy Code Snippet Manager #

A powerful Flutter package for storing, organizing, searching, highlighting, and copying code snippets.


About Me #

✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.

Learn more:

🌐 https://sufyanism.com/

LinkedIn:

šŸ”— https://www.linkedin.com/in/sufyanism


Your all-in-one learning hub! #

šŸš€ Explore courses and resources in coding, technology, and development.

Zeba Academy helps developers improve their skills through:

  • Coding tutorials
  • Development resources
  • Practical projects
  • Hands-on learning

Main Website:

āž” https://zeba.academy

Coding Resources:

āž” https://code.zeba.academy

YouTube:

āž” https://www.youtube.com/@zeba.academy

Instagram:

āž” https://www.instagram.com/zeba.academy/


About Package #

zeba_academy_code_snippet_manager

is a Flutter package that helps developers store, organize, manage, and reuse code snippets.

It provides a complete snippet management system with:

āœ… Local storage āœ… Syntax highlighting āœ… Tags āœ… Collections āœ… Search āœ… Copy support


Features #

šŸ“¦ Snippet Storage #

Store snippets locally.

Supports:

  • Create snippets
  • Save snippets
  • Delete snippets
  • Load saved snippets

Example:

final snippet = SnippetModel(

 id: "1",

 title: "Flutter Button",

 code: "ElevatedButton()",

 language: "dart",

);

šŸŽØ Syntax Highlighting #

Display code with syntax colors.

Example:

void main(){

 print("Hello Flutter");

}

Supports multiple languages using Highlight engine.


šŸ· Tags #

Organize snippets using tags.

Example:

tags:

[
 "flutter",
 "dart",
 "ui"
]

Search snippets quickly using tags.


šŸ“ Collections #

Group snippets together.

Example:

Flutter Widgets

Dart Basics

API Examples

Projects

Search by:

  • Title
  • Code
  • Tags

Example:

manager.search(
 "flutter"
);

šŸ“‹ Copy Support #

Copy code snippets easily.

Example:

CopyHelper.copy(
 snippet.code
);

Installation #

Add dependency:

dependencies:

  zeba_academy_code_snippet_manager:
    version: ^1.0.0

Run:

flutter pub get

Usage #

Import:

import 'package:zeba_academy_code_snippet_manager/zeba_academy_code_snippet_manager.dart';

Create Manager #

final manager = SnippetManager();


await manager.init();

Add Snippet #

await manager.addSnippet(

 SnippetModel(

  id: "1",

  title: "Hello Flutter",

  code: "print('Hello');",

  language: "dart",

  tags:[
   "flutter"
  ]

 )

);

Search Snippets #

final results =
manager.search(
 "flutter"
);

Collection Filter #

final result =
manager.collection(
 "Widgets"
);

UI Widget #

Display snippet card:

SnippetCard(

 snippet: snippet,

)

Folder Structure #

lib/

ā”œā”€ā”€ models/

│   └── snippet_model.dart


ā”œā”€ā”€ storage/

│   └── snippet_storage.dart


ā”œā”€ā”€ manager/

│   └── snippet_manager.dart


ā”œā”€ā”€ widgets/

│   └── snippet_card.dart


└── utils/

    ā”œā”€ā”€ syntax_highlighter.dart

    └── copy_helper.dart


Dependencies #

This package uses:

  • shared_preferences
  • highlight
  • clipboard

Requirements #

Flutter:

>=3.10.0

Dart:

>=3.0.0 <4.0.0

Roadmap #

Future plans:

  • Cloud synchronization

  • Import / Export snippets

  • Markdown support

  • Code editor

  • Backup system

  • AI snippet suggestions


Contributing #

Contributions are welcome.

Steps:

Fork repository

Create branch:

git checkout -b feature/new-feature

Commit:

git commit -m "Add feature"

Push:

git push origin feature/new-feature

Create Pull Request.


License #

This project is licensed under the:

GNU General Public License v3.0 #

You are free to:

āœ… Use āœ… Modify āœ… Share āœ… Distribute

Any modified version must also remain open source under GPL-3.0.

See:

LICENSE

for complete license text.


Author #

Sufyan bin Uzayr

Open-source developer

Website:

https://sufyanism.com/


⭐ If this package helps you, consider supporting the project.

Made with ā¤ļø for Flutter developers.

0
likes
130
points
81
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

A Flutter package for storing, searching, tagging, highlighting and copying code snippets.

Homepage

License

GPL-3.0 (license)

Dependencies

clipboard, flutter, highlight, shared_preferences

More

Packages that depend on zeba_academy_code_snippet_manager