{"id":24013637,"url":"https://github.com/mahmoudelsayed7/sqflite","last_synced_at":"2026-05-05T13:41:50.031Z","repository":{"id":266792321,"uuid":"844293712","full_name":"MAHMOUDELSAYED7/SQFlite","owner":"MAHMOUDELSAYED7","description":"SqlDb - SQLite Database Handler for Flutter.","archived":false,"fork":false,"pushed_at":"2024-12-06T07:59:58.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T06:57:04.214Z","etag":null,"topics":["database","db","flutter","flutter-apps","flutter-package","flutter-plugin","flutter-sqflite","local-database","localstorage","pub-dev","sqflite","sqflite-database","sql","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MAHMOUDELSAYED7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-19T00:19:41.000Z","updated_at":"2024-12-06T08:00:01.000Z","dependencies_parsed_at":"2024-12-06T06:30:29.703Z","dependency_job_id":"1b6af03f-c3d4-453b-9a50-cad3af28db4c","html_url":"https://github.com/MAHMOUDELSAYED7/SQFlite","commit_stats":null,"previous_names":["mahmoudelsayed7/sqflite"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAHMOUDELSAYED7%2FSQFlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAHMOUDELSAYED7%2FSQFlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAHMOUDELSAYED7%2FSQFlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAHMOUDELSAYED7%2FSQFlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MAHMOUDELSAYED7","download_url":"https://codeload.github.com/MAHMOUDELSAYED7/SQFlite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240710050,"owners_count":19845039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","db","flutter","flutter-apps","flutter-package","flutter-plugin","flutter-sqflite","local-database","localstorage","pub-dev","sqflite","sqflite-database","sql","sqlite3"],"created_at":"2025-01-08T06:56:13.938Z","updated_at":"2026-05-05T13:41:49.976Z","avatar_url":"https://github.com/MAHMOUDELSAYED7.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SqlDb - SQLite Database Handler for Flutter\n\nThis Flutter project provides a reusable, singleton class, `SqlDb`, to handle SQLite database operations using the `sqflite` package. The class manages the creation, initialization, and CRUD operations on a database, allowing developers to define their own table schemas dynamically.\n\n## Features\n\n- **Singleton Design Pattern**: Ensures only one instance of the database is used throughout the app.\n- **Database Initialization**: Automatically initializes the database and creates tables based on user-defined schemas.\n- **Flexible Table Management**: Add custom table definitions that will be used to create tables when the database is initialized.\n- **CRUD Operations**: Includes methods for creating, reading, updating, and deleting records.\n- **User Management**: Allows inserting and retrieving users, with support for username and password validation.\n- **Invoice Management**: Supports saving invoices and generating the next invoice number for a user.\n  \n## Getting Started\n\n### Prerequisites\n\nEnsure you have Flutter installed and set up on your machine. You will also need to include the following dependencies in your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  flutter:\n    sdk: flutter\n  sqflite: ^2.0.0+4\n  path: ^1.8.3\n```\n### Installation\nClone the repository or copy the SqlDb class into your Flutter project.\n\nInitialize the database in your main application file. You can do this using an anonymous object:\n\n```dart\nFuture\u003cvoid\u003e main() async {\n  WidgetsFlutterBinding.ensureInitialized();\n  await SqlDb().initializeDatabase();\n  runApp(MyApp());\n}\n```\n## Notice\n\nYou can easily customize the database structure by modifying the table definitions in the `_onCreate` method. This makes `SqlDb` suitable for various applications, from simple apps to complex systems with unique data needs.\n\n## Contact\n\nFor any questions or feedback, please reach out via email: [mahmoudelsayed.dev@gmail.com](mahmoudelsayed.dev@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmoudelsayed7%2Fsqflite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahmoudelsayed7%2Fsqflite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmoudelsayed7%2Fsqflite/lists"}