flutter_notepad 0.0.3 copy "flutter_notepad: ^0.0.3" to clipboard
flutter_notepad: ^0.0.3 copied to clipboard

A Flutter package for a fully functional notepad with local storage, PDF export, and text-to-speech.

πŸ“’ Flutter Notepad

A powerful and lightweight Flutter package for a fully functional notepad, featuring local storage, PDF export, and text-to-speech.

✨ Features βœ”οΈ Create, Edit, Delete Notes βœ”οΈ Categorize Notes (General, Work, Personal, etc.) βœ”οΈ Export Notes as PDF πŸ“„ βœ”οΈ Text-to-Speech Support πŸ”Š βœ”οΈ Local Notifications for Reminders ⏰ βœ”οΈ SQLite Local Storage πŸ’Ύ βœ”οΈ Dark Mode Support πŸŒ™

πŸš€ Installation Add the following to your pubspec.yaml:

dependencies: flutter_notepad: ^0.0.1

flutter pub get

πŸ“Œ Usage 1️⃣ Initialize the Database Before using the package, initialize SQLite:

import 'package:flutter_notepad/db_helper.dart';

void main() async { final dbHelper = DBHelper(); await dbHelper.initDB(); } 2️⃣ Creating a New Note

import 'package:flutter_notepad/note.dart'; import 'package:flutter_notepad/db_helper.dart';

final dbHelper = DBHelper();

void addNewNote() async { Note newNote = Note( title: "My First Note", content: "This is a sample note created using flutter_notepad.", category: "Personal", createdAt: DateTime.now().toIso8601String(), );

await dbHelper.addNote(newNote); }

3️⃣ Fetching All Notes

void fetchNotes() async { List

4️⃣ Editing a Note

void editNote(Note note) async { Note updatedNote = Note( id: note.id, title: "Updated Title", content: "Updated Content", category: note.category, createdAt: note.createdAt, );

await dbHelper.updateNote(updatedNote); }

5️⃣ Deleting a Note

void deleteNote(int id) async { await dbHelper.deleteNote(id); }

6️⃣ Exporting a Note as PDF

import 'package:pdf/pdf.dart'; import 'package:pdf/widgets.dart' as pw;

void exportToPDF(Note note) async { final pdf = pw.Document();

pdf.addPage( pw.Page( build: (pw.Context context) => pw.Center( child: pw.Text(note.content), ), ), );

// Save or Share PDF }

7️⃣ Text-to-Speech (TTS) Support

import 'package:flutter_tts/flutter_tts.dart';

final FlutterTts flutterTts = FlutterTts();

void speak(String text) async { await flutterTts.setLanguage("en-US"); await flutterTts.speak(text); }

8️⃣ Local Notifications

import 'package:flutter_local_notifications/flutter_local_notifications.dart';

final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();

void showNotification(String noteTitle) async { const AndroidNotificationDetails androidPlatformChannelSpecifics = AndroidNotificationDetails( 'notepad_channel', 'Notepad Notifications', importance: Importance.high, priority: Priority.high, );

const NotificationDetails platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics);

await flutterLocalNotificationsPlugin.show( 0, "Reminder", "Don't forget: $noteTitle", platformChannelSpecifics, ); }

πŸ“‚ Folder Structure

flutter_notepad/ │── lib/ β”‚ β”œβ”€β”€ db_helper.dart # SQLite Database Helper β”‚ β”œβ”€β”€ note.dart # Note Model β”‚ β”œβ”€β”€ notepad_widget.dart # UI Component for Notepad β”‚ β”œβ”€β”€ note_edit_screen.dart # Note Editing Screen │── example/ β”‚ β”œβ”€β”€ lib/ β”‚ β”‚ β”œβ”€β”€ main.dart # Example Usage │── test/ │── pubspec.yaml │── README.md │── LICENSE

🎯 Roadmap

βœ… Basic CRUD Functionality

βœ… Export to PDF

βœ… Text-to-Speech

πŸš€ Cloud Sync (Future Update)

πŸš€ Cross-Device Synchronization

πŸ“’ Contributing We ❀️ contributions! Feel free to submit a PR or report an issue at πŸ”— GitHub Issues

πŸ“œ License This project is licensed under the MIT License. See the LICENSE file for details.

1
likes
145
points
35
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for a fully functional notepad with local storage, PDF export, and text-to-speech.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, flutter_local_notifications, flutter_tts, intl, path, path_provider, pdf, shared_preferences, sqflite

More

Packages that depend on flutter_notepad