zeba_academy_code_snippet_manager 1.0.0
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:
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:
Coding Resources:
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 #
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:
ā If this package helps you, consider supporting the project.
Made with ā¤ļø for Flutter developers.