From 05b9244d8cb5fd1e1079d01a5a610c06ca3c4155 Mon Sep 17 00:00:00 2001 From: Nikita Sirovsky Date: Wed, 8 Dec 2021 08:49:40 +0200 Subject: [PATCH 1/2] Move leafy notes db to a separate folder --- src/analysis_options.yaml | 2 +- src/leafy_notes_db/analysis_options.yaml | 49 -- src/leafy_notes_db/pubspec.lock | 527 ------------------ src/leafy_notes_db/pubspec.yaml | 21 - .../extensions/iterable_extensions.dart | 0 .../extensions/map_extensions.dart | 0 .../leafy_notes_db}/leafy_notes_database.dart | 4 +- .../database/leafy_notes_db}/src/daos.dart | 0 .../leafy_notes_db}/src/leafy_notes_db.dart | 0 .../leafy_notes_db}/src/leafy_notes_db.g.dart | 0 .../database/leafy_notes_db}/src/models.dart | 0 .../src/models/folder/dao/folder_dao.dart | 8 +- .../src/models/folder/dao/folder_dao.g.dart | 0 .../models/folder/model/folder_converter.dart | 3 +- .../src/models/folder/model/folder_model.dart | 0 .../folder/repository/folder_repository.dart | 0 .../repository/folder_repository_impl.dart | 6 +- .../src/models/folder/table/folder_table.dart | 0 .../src/models/folder/table/sorts.dart | 0 .../src/models/note/dao/note_dao.dart | 2 +- .../src/models/note/dao/note_dao.g.dart | 0 .../src/models/note/model/note_converter.dart | 0 .../src/models/note/model/note_model.dart | 0 .../note/repository/note_repository.dart | 0 .../note/repository/note_repository_impl.dart | 5 +- .../src/models/note/table/note_table.dart | 0 .../src/models/note/table/sorts.dart | 0 .../src/one_to_many/folder_with_notes.dart | 0 .../leafy_notes_db}/src/one_to_manys.dart | 0 .../src/repositories/repositories.dart | 0 .../database/leafy_notes_db}/src/tables.dart | 0 src/lib/leafy_launcher.dart | 2 +- .../folders/home_note_folders_controller.dart | 3 +- .../list/home_note_folder_container.dart | 2 +- .../widget/list/home_note_folders_list.dart | 2 +- .../notes/note/home_note_controller.dart | 3 +- .../notes/notes/home_notes_controller.dart | 2 +- .../notes/notes/home_notes_page.dart | 2 +- .../widget/list/home_note_container.dart | 2 +- .../notes/widget/list/home_notes_list.dart | 2 +- .../notes/widget/title/home_notes_title.dart | 2 +- src/pubspec.lock | 20 +- src/pubspec.yaml | 7 +- 43 files changed, 29 insertions(+), 647 deletions(-) delete mode 100644 src/leafy_notes_db/analysis_options.yaml delete mode 100644 src/leafy_notes_db/pubspec.lock delete mode 100644 src/leafy_notes_db/pubspec.yaml rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/extensions/iterable_extensions.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/extensions/map_extensions.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/leafy_notes_database.dart (88%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/daos.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/leafy_notes_db.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/leafy_notes_db.g.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/folder/dao/folder_dao.dart (90%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/folder/dao/folder_dao.g.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/folder/model/folder_converter.dart (90%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/folder/model/folder_model.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/folder/repository/folder_repository.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/folder/repository/folder_repository_impl.dart (88%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/folder/table/folder_table.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/folder/table/sorts.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/note/dao/note_dao.dart (96%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/note/dao/note_dao.g.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/note/model/note_converter.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/note/model/note_model.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/note/repository/note_repository.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/note/repository/note_repository_impl.dart (87%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/note/table/note_table.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/models/note/table/sorts.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/one_to_many/folder_with_notes.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/one_to_manys.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/repositories/repositories.dart (100%) rename src/{leafy_notes_db/lib => lib/database/leafy_notes_db}/src/tables.dart (100%) diff --git a/src/analysis_options.yaml b/src/analysis_options.yaml index 0a11c56..430266a 100644 --- a/src/analysis_options.yaml +++ b/src/analysis_options.yaml @@ -46,4 +46,4 @@ analyzer: invariant_booleans: ignore avoid_classes_with_only_static_members: ignore exclude: - [lib/*.g.dart] \ No newline at end of file + [lib/**.g.dart] \ No newline at end of file diff --git a/src/leafy_notes_db/analysis_options.yaml b/src/leafy_notes_db/analysis_options.yaml deleted file mode 100644 index 430266a..0000000 --- a/src/leafy_notes_db/analysis_options.yaml +++ /dev/null @@ -1,49 +0,0 @@ -include: package:lint/analysis_options.yaml - -linter: - rules: - avoid_classes_with_only_static_methods: false - await_only_futures: true - - # Temporary - public_member_api_docs: false - - type_annotate_public_apis: false - - # This looks more organized. - sort_constructors_first: true - - # This looks more organized. - sort_pub_dependencies: true - - # Single qoutes looks prettier and more compact. - prefer_single_quotes: true - - # Sometimes it just doesn't make sense. - lines_longer_than_80_chars: true - - # Make variables "var" only when really needed. - prefer_final_locals: true - - # This doesn't make the code more readable. - # It forces us not to use - # final variable = 5; - # But to use - # final int variable = 5; - always_specify_types: false - -analyzer: - errors: - prefer_const_constructors: error - missing_return: error - missing_required_param: error - directives_ordering: error - unnecessary_new: error - unnecessary_this: error - unnecessary_const: error - todo: ignore - no_logic_in_create_state: ignore - invariant_booleans: ignore - avoid_classes_with_only_static_members: ignore - exclude: - [lib/**.g.dart] \ No newline at end of file diff --git a/src/leafy_notes_db/pubspec.lock b/src/leafy_notes_db/pubspec.lock deleted file mode 100644 index a4823e3..0000000 --- a/src/leafy_notes_db/pubspec.lock +++ /dev/null @@ -1,527 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - url: "https://pub.dartlang.org" - source: hosted - version: "31.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.0" - analyzer_plugin: - dependency: transitive - description: - name: analyzer_plugin - url: "https://pub.dartlang.org" - source: hosted - version: "0.8.0" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - build: - dependency: transitive - description: - name: build - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - build_config: - dependency: transitive - description: - name: build_config - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - build_daemon: - dependency: transitive - description: - name: build_daemon - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - build_runner: - dependency: "direct dev" - description: - name: build_runner - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - url: "https://pub.dartlang.org" - source: hosted - version: "7.2.2" - built_collection: - dependency: transitive - description: - name: built_collection - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - url: "https://pub.dartlang.org" - source: hosted - version: "8.1.3" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.5" - code_builder: - dependency: transitive - description: - name: code_builder - url: "https://pub.dartlang.org" - source: hosted - version: "4.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - convert: - dependency: transitive - description: - name: convert - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - dart_style: - dependency: transitive - description: - name: dart_style - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - drift: - dependency: transitive - description: - name: drift - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - drift_dev: - dependency: transitive - description: - name: drift_dev - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - fixnum: - dependency: transitive - description: - name: fixnum - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - get: - dependency: "direct dev" - description: - name: get - url: "https://pub.dartlang.org" - source: hosted - version: "4.5.1" - glob: - dependency: transitive - description: - name: glob - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - graphs: - dependency: transitive - description: - name: graphs - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - io: - dependency: transitive - description: - name: io - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - lint: - dependency: "direct main" - description: - name: lint - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.2" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - mime: - dependency: transitive - description: - name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - moor: - dependency: transitive - description: - name: moor - url: "https://pub.dartlang.org" - source: hosted - version: "4.6.1+1" - moor_flutter: - dependency: "direct main" - description: - name: moor_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - moor_generator: - dependency: "direct dev" - description: - name: moor_generator - url: "https://pub.dartlang.org" - source: hosted - version: "4.6.0+1" - package_config: - dependency: transitive - description: - name: package_config - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - pool: - dependency: transitive - description: - name: pool - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.0" - pub_semver: - dependency: transitive - description: - name: pub_semver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - recase: - dependency: transitive - description: - name: recase - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - shelf: - dependency: transitive - description: - name: shelf - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_gen: - dependency: transitive - description: - name: source_gen - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - sqflite: - dependency: transitive - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0+4" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1+1" - sqlite3: - dependency: transitive - description: - name: sqlite3 - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - sqlite3_flutter_libs: - dependency: "direct main" - description: - name: sqlite3_flutter_libs - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.1" - sqlparser: - dependency: transitive - description: - name: sqlparser - url: "https://pub.dartlang.org" - source: hosted - version: "0.18.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - stream_transform: - dependency: transitive - description: - name: stream_transform - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - timing: - dependency: transitive - description: - name: timing - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - uuid: - dependency: "direct main" - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.5" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - watcher: - dependency: transitive - description: - name: watcher - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" -sdks: - dart: ">=2.14.0 <3.0.0" - flutter: ">=1.10.1" diff --git a/src/leafy_notes_db/pubspec.yaml b/src/leafy_notes_db/pubspec.yaml deleted file mode 100644 index ddfa2b1..0000000 --- a/src/leafy_notes_db/pubspec.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: leafy_notes_database - -version: 1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - equatable: 2.0.3 - flutter: - sdk: flutter - - lint: ^1.5.3 - moor_flutter: ^4.0.0 - sqlite3_flutter_libs: 0.5.1 - uuid: ^3.0.5 - -dev_dependencies: - build_runner: ^2.1.4 - get: ^4.3.8 - moor_generator: ^4.6.0+1 \ No newline at end of file diff --git a/src/leafy_notes_db/lib/extensions/iterable_extensions.dart b/src/lib/database/leafy_notes_db/extensions/iterable_extensions.dart similarity index 100% rename from src/leafy_notes_db/lib/extensions/iterable_extensions.dart rename to src/lib/database/leafy_notes_db/extensions/iterable_extensions.dart diff --git a/src/leafy_notes_db/lib/extensions/map_extensions.dart b/src/lib/database/leafy_notes_db/extensions/map_extensions.dart similarity index 100% rename from src/leafy_notes_db/lib/extensions/map_extensions.dart rename to src/lib/database/leafy_notes_db/extensions/map_extensions.dart diff --git a/src/leafy_notes_db/lib/leafy_notes_database.dart b/src/lib/database/leafy_notes_db/leafy_notes_database.dart similarity index 88% rename from src/leafy_notes_db/lib/leafy_notes_database.dart rename to src/lib/database/leafy_notes_db/leafy_notes_database.dart index ea5ad44..c729515 100644 --- a/src/leafy_notes_db/lib/leafy_notes_database.dart +++ b/src/lib/database/leafy_notes_db/leafy_notes_database.dart @@ -4,10 +4,10 @@ import 'dart:async'; // ignore: depend_on_referenced_packages import 'package:get/get.dart'; -import 'package:leafy_notes_database/src/leafy_notes_db.dart'; -import 'package:leafy_notes_database/src/models/folder/model/folder_converter.dart'; +import 'src/leafy_notes_db.dart'; import 'src/models.dart'; +import 'src/models/folder/model/folder_converter.dart'; import 'src/models/folder/repository/folder_repository_impl.dart'; import 'src/models/note/repository/note_repository_impl.dart'; import 'src/repositories/repositories.dart'; diff --git a/src/leafy_notes_db/lib/src/daos.dart b/src/lib/database/leafy_notes_db/src/daos.dart similarity index 100% rename from src/leafy_notes_db/lib/src/daos.dart rename to src/lib/database/leafy_notes_db/src/daos.dart diff --git a/src/leafy_notes_db/lib/src/leafy_notes_db.dart b/src/lib/database/leafy_notes_db/src/leafy_notes_db.dart similarity index 100% rename from src/leafy_notes_db/lib/src/leafy_notes_db.dart rename to src/lib/database/leafy_notes_db/src/leafy_notes_db.dart diff --git a/src/leafy_notes_db/lib/src/leafy_notes_db.g.dart b/src/lib/database/leafy_notes_db/src/leafy_notes_db.g.dart similarity index 100% rename from src/leafy_notes_db/lib/src/leafy_notes_db.g.dart rename to src/lib/database/leafy_notes_db/src/leafy_notes_db.g.dart diff --git a/src/leafy_notes_db/lib/src/models.dart b/src/lib/database/leafy_notes_db/src/models.dart similarity index 100% rename from src/leafy_notes_db/lib/src/models.dart rename to src/lib/database/leafy_notes_db/src/models.dart diff --git a/src/leafy_notes_db/lib/src/models/folder/dao/folder_dao.dart b/src/lib/database/leafy_notes_db/src/models/folder/dao/folder_dao.dart similarity index 90% rename from src/leafy_notes_db/lib/src/models/folder/dao/folder_dao.dart rename to src/lib/database/leafy_notes_db/src/models/folder/dao/folder_dao.dart index 95c12bc..750560b 100644 --- a/src/leafy_notes_db/lib/src/models/folder/dao/folder_dao.dart +++ b/src/lib/database/leafy_notes_db/src/models/folder/dao/folder_dao.dart @@ -1,11 +1,11 @@ -import 'package:leafy_notes_database/extensions/map_extensions.dart'; -import 'package:leafy_notes_database/src/models/folder/model/folder_converter.dart'; -import 'package:leafy_notes_database/src/models/note/model/note_converter.dart'; -import 'package:leafy_notes_database/src/models/note/model/note_model.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/src/models/folder/model/folder_converter.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/src/models/note/model/note_converter.dart'; import 'package:moor_flutter/moor_flutter.dart'; import 'package:uuid/uuid.dart'; +import '../../../../extensions/map_extensions.dart'; import '../../../leafy_notes_db.dart'; +import '../../../models.dart'; import '../../../one_to_many/folder_with_notes.dart'; import '../../note/table/note_table.dart'; import '../model/folder_model.dart'; diff --git a/src/leafy_notes_db/lib/src/models/folder/dao/folder_dao.g.dart b/src/lib/database/leafy_notes_db/src/models/folder/dao/folder_dao.g.dart similarity index 100% rename from src/leafy_notes_db/lib/src/models/folder/dao/folder_dao.g.dart rename to src/lib/database/leafy_notes_db/src/models/folder/dao/folder_dao.g.dart diff --git a/src/leafy_notes_db/lib/src/models/folder/model/folder_converter.dart b/src/lib/database/leafy_notes_db/src/models/folder/model/folder_converter.dart similarity index 90% rename from src/leafy_notes_db/lib/src/models/folder/model/folder_converter.dart rename to src/lib/database/leafy_notes_db/src/models/folder/model/folder_converter.dart index 4bd220e..1a3d187 100644 --- a/src/leafy_notes_db/lib/src/models/folder/model/folder_converter.dart +++ b/src/lib/database/leafy_notes_db/src/models/folder/model/folder_converter.dart @@ -1,6 +1,5 @@ -import 'package:leafy_notes_database/leafy_notes_database.dart'; - import '../../../leafy_notes_db.dart'; +import 'folder_model.dart'; Folder folderModelToDb(FolderModel folder) { return Folder( diff --git a/src/leafy_notes_db/lib/src/models/folder/model/folder_model.dart b/src/lib/database/leafy_notes_db/src/models/folder/model/folder_model.dart similarity index 100% rename from src/leafy_notes_db/lib/src/models/folder/model/folder_model.dart rename to src/lib/database/leafy_notes_db/src/models/folder/model/folder_model.dart diff --git a/src/leafy_notes_db/lib/src/models/folder/repository/folder_repository.dart b/src/lib/database/leafy_notes_db/src/models/folder/repository/folder_repository.dart similarity index 100% rename from src/leafy_notes_db/lib/src/models/folder/repository/folder_repository.dart rename to src/lib/database/leafy_notes_db/src/models/folder/repository/folder_repository.dart diff --git a/src/leafy_notes_db/lib/src/models/folder/repository/folder_repository_impl.dart b/src/lib/database/leafy_notes_db/src/models/folder/repository/folder_repository_impl.dart similarity index 88% rename from src/leafy_notes_db/lib/src/models/folder/repository/folder_repository_impl.dart rename to src/lib/database/leafy_notes_db/src/models/folder/repository/folder_repository_impl.dart index a7716cc..d919408 100644 --- a/src/leafy_notes_db/lib/src/models/folder/repository/folder_repository_impl.dart +++ b/src/lib/database/leafy_notes_db/src/models/folder/repository/folder_repository_impl.dart @@ -1,12 +1,12 @@ // ignore_for_file: avoid_catching_errors -import 'package:leafy_notes_database/src/leafy_notes_db.dart'; -import 'package:leafy_notes_database/src/models/folder/model/folder_converter.dart'; -import 'package:leafy_notes_database/src/one_to_many/folder_with_notes.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/src/models/folder/model/folder_converter.dart'; import 'package:moor_flutter/moor_flutter.dart'; import 'package:uuid/uuid.dart'; +import '../../../leafy_notes_db.dart'; import '../../../models.dart'; +import '../../../one_to_manys.dart'; import 'folder_repository.dart'; class FolderRepositoryImpl implements FolderRepository { diff --git a/src/leafy_notes_db/lib/src/models/folder/table/folder_table.dart b/src/lib/database/leafy_notes_db/src/models/folder/table/folder_table.dart similarity index 100% rename from src/leafy_notes_db/lib/src/models/folder/table/folder_table.dart rename to src/lib/database/leafy_notes_db/src/models/folder/table/folder_table.dart diff --git a/src/leafy_notes_db/lib/src/models/folder/table/sorts.dart b/src/lib/database/leafy_notes_db/src/models/folder/table/sorts.dart similarity index 100% rename from src/leafy_notes_db/lib/src/models/folder/table/sorts.dart rename to src/lib/database/leafy_notes_db/src/models/folder/table/sorts.dart diff --git a/src/leafy_notes_db/lib/src/models/note/dao/note_dao.dart b/src/lib/database/leafy_notes_db/src/models/note/dao/note_dao.dart similarity index 96% rename from src/leafy_notes_db/lib/src/models/note/dao/note_dao.dart rename to src/lib/database/leafy_notes_db/src/models/note/dao/note_dao.dart index fb78fd3..5bc580a 100644 --- a/src/leafy_notes_db/lib/src/models/note/dao/note_dao.dart +++ b/src/lib/database/leafy_notes_db/src/models/note/dao/note_dao.dart @@ -1,9 +1,9 @@ -import 'package:leafy_notes_database/src/models/folder/model/folder_converter.dart'; import 'package:moor_flutter/moor_flutter.dart'; import '../../../../leafy_notes_database.dart'; import '../../../leafy_notes_db.dart'; import '../../../one_to_many/folder_with_notes.dart'; +import '../../folder/model/folder_converter.dart'; import '../../folder/table/folder_table.dart'; import '../model/note_converter.dart'; import '../model/note_model.dart'; diff --git a/src/leafy_notes_db/lib/src/models/note/dao/note_dao.g.dart b/src/lib/database/leafy_notes_db/src/models/note/dao/note_dao.g.dart similarity index 100% rename from src/leafy_notes_db/lib/src/models/note/dao/note_dao.g.dart rename to src/lib/database/leafy_notes_db/src/models/note/dao/note_dao.g.dart diff --git a/src/leafy_notes_db/lib/src/models/note/model/note_converter.dart b/src/lib/database/leafy_notes_db/src/models/note/model/note_converter.dart similarity index 100% rename from src/leafy_notes_db/lib/src/models/note/model/note_converter.dart rename to src/lib/database/leafy_notes_db/src/models/note/model/note_converter.dart diff --git a/src/leafy_notes_db/lib/src/models/note/model/note_model.dart b/src/lib/database/leafy_notes_db/src/models/note/model/note_model.dart similarity index 100% rename from src/leafy_notes_db/lib/src/models/note/model/note_model.dart rename to src/lib/database/leafy_notes_db/src/models/note/model/note_model.dart diff --git a/src/leafy_notes_db/lib/src/models/note/repository/note_repository.dart b/src/lib/database/leafy_notes_db/src/models/note/repository/note_repository.dart similarity index 100% rename from src/leafy_notes_db/lib/src/models/note/repository/note_repository.dart rename to src/lib/database/leafy_notes_db/src/models/note/repository/note_repository.dart diff --git a/src/leafy_notes_db/lib/src/models/note/repository/note_repository_impl.dart b/src/lib/database/leafy_notes_db/src/models/note/repository/note_repository_impl.dart similarity index 87% rename from src/leafy_notes_db/lib/src/models/note/repository/note_repository_impl.dart rename to src/lib/database/leafy_notes_db/src/models/note/repository/note_repository_impl.dart index 31a280e..7bfb552 100644 --- a/src/leafy_notes_db/lib/src/models/note/repository/note_repository_impl.dart +++ b/src/lib/database/leafy_notes_db/src/models/note/repository/note_repository_impl.dart @@ -1,9 +1,8 @@ -import 'package:leafy_notes_database/src/leafy_notes_db.dart'; -import 'package:leafy_notes_database/src/models/note/repository/note_repository.dart'; -import 'package:leafy_notes_database/src/one_to_many/folder_with_notes.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/leafy_notes_database.dart'; import 'package:moor_flutter/moor_flutter.dart'; import 'package:uuid/uuid.dart'; +import '../../../leafy_notes_db.dart'; import '../../../models.dart'; import '../model/note_converter.dart'; diff --git a/src/leafy_notes_db/lib/src/models/note/table/note_table.dart b/src/lib/database/leafy_notes_db/src/models/note/table/note_table.dart similarity index 100% rename from src/leafy_notes_db/lib/src/models/note/table/note_table.dart rename to src/lib/database/leafy_notes_db/src/models/note/table/note_table.dart diff --git a/src/leafy_notes_db/lib/src/models/note/table/sorts.dart b/src/lib/database/leafy_notes_db/src/models/note/table/sorts.dart similarity index 100% rename from src/leafy_notes_db/lib/src/models/note/table/sorts.dart rename to src/lib/database/leafy_notes_db/src/models/note/table/sorts.dart diff --git a/src/leafy_notes_db/lib/src/one_to_many/folder_with_notes.dart b/src/lib/database/leafy_notes_db/src/one_to_many/folder_with_notes.dart similarity index 100% rename from src/leafy_notes_db/lib/src/one_to_many/folder_with_notes.dart rename to src/lib/database/leafy_notes_db/src/one_to_many/folder_with_notes.dart diff --git a/src/leafy_notes_db/lib/src/one_to_manys.dart b/src/lib/database/leafy_notes_db/src/one_to_manys.dart similarity index 100% rename from src/leafy_notes_db/lib/src/one_to_manys.dart rename to src/lib/database/leafy_notes_db/src/one_to_manys.dart diff --git a/src/leafy_notes_db/lib/src/repositories/repositories.dart b/src/lib/database/leafy_notes_db/src/repositories/repositories.dart similarity index 100% rename from src/leafy_notes_db/lib/src/repositories/repositories.dart rename to src/lib/database/leafy_notes_db/src/repositories/repositories.dart diff --git a/src/leafy_notes_db/lib/src/tables.dart b/src/lib/database/leafy_notes_db/src/tables.dart similarity index 100% rename from src/leafy_notes_db/lib/src/tables.dart rename to src/lib/database/leafy_notes_db/src/tables.dart diff --git a/src/lib/leafy_launcher.dart b/src/lib/leafy_launcher.dart index 76bb816..13d18dd 100644 --- a/src/lib/leafy_launcher.dart +++ b/src/lib/leafy_launcher.dart @@ -12,9 +12,9 @@ import 'package:leafy_launcher/module/intro/tutorial/tutorial_page.dart'; import 'package:leafy_launcher/resources/settings/leafy_settings.dart'; import 'package:leafy_launcher/services/share/share_service.dart'; import 'package:leafy_launcher/services/toast/toast_service.dart'; -import 'package:leafy_notes_database/leafy_notes_database.dart'; import 'app_routes.dart'; +import 'database/leafy_notes_db/leafy_notes_database.dart'; import 'module/app_picker/app_picker_binding.dart'; import 'module/app_picker/app_picker_home_controller.dart'; import 'module/app_picker/app_picker_page.dart'; diff --git a/src/lib/module/home_notes/notes/folders/home_note_folders_controller.dart b/src/lib/module/home_notes/notes/folders/home_note_folders_controller.dart index adf09b3..cdc5ee0 100644 --- a/src/lib/module/home_notes/notes/folders/home_note_folders_controller.dart +++ b/src/lib/module/home_notes/notes/folders/home_note_folders_controller.dart @@ -1,13 +1,12 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; - import 'package:leafy_launcher/base/controller/status_controller_base.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/leafy_notes_database.dart'; import 'package:leafy_launcher/resources/app_constants.dart'; import 'package:leafy_launcher/resources/localization/l10n.dart'; import 'package:leafy_launcher/resources/localization/l10n_provider.dart'; import 'package:leafy_launcher/resources/theme/home_theme.dart'; import 'package:leafy_launcher/utils/dialogs/input/input_dialog.dart'; -import 'package:leafy_notes_database/leafy_notes_database.dart'; import '../../../../app_routes.dart'; diff --git a/src/lib/module/home_notes/notes/folders/widget/list/home_note_folder_container.dart b/src/lib/module/home_notes/notes/folders/widget/list/home_note_folder_container.dart index ec4b37e..02cefd6 100644 --- a/src/lib/module/home_notes/notes/folders/widget/list/home_note_folder_container.dart +++ b/src/lib/module/home_notes/notes/folders/widget/list/home_note_folder_container.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/leafy_notes_database.dart'; import 'package:leafy_launcher/resources/localization/l10n.dart'; import 'package:leafy_launcher/resources/localization/l10n_provider.dart'; import 'package:leafy_launcher/resources/theme/home_theme.dart'; import 'package:leafy_launcher/resources/theme/leafy_theme.dart'; import 'package:leafy_launcher/shared_widget/section/leafy_text_section_item.dart'; import 'package:leafy_launcher/shared_widget/themed_widget.dart'; -import 'package:leafy_notes_database/leafy_notes_database.dart'; typedef OnFolderSelected = void Function(FolderModel note); diff --git a/src/lib/module/home_notes/notes/folders/widget/list/home_note_folders_list.dart b/src/lib/module/home_notes/notes/folders/widget/list/home_note_folders_list.dart index af163dd..042372b 100644 --- a/src/lib/module/home_notes/notes/folders/widget/list/home_note_folders_list.dart +++ b/src/lib/module/home_notes/notes/folders/widget/list/home_note_folders_list.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/leafy_notes_database.dart'; import 'package:leafy_launcher/module/home/utils/gesture_processer.dart'; import 'package:leafy_launcher/module/home_notes/notes/folders/home_note_folders_controller.dart'; import 'package:leafy_launcher/resources/theme/home_theme.dart'; @@ -7,7 +8,6 @@ import 'package:leafy_launcher/shared_widget/list/dismissible_delete_background. import 'package:leafy_launcher/shared_widget/section/leafy_section.dart'; import 'package:leafy_launcher/shared_widget/themed_get_widget.dart'; import 'package:leafy_launcher/shared_widget/themed_widget.dart'; -import 'package:leafy_notes_database/leafy_notes_database.dart'; import 'home_note_folder_container.dart'; diff --git a/src/lib/module/home_notes/notes/note/home_note_controller.dart b/src/lib/module/home_notes/notes/note/home_note_controller.dart index 9dd8046..2cf7732 100644 --- a/src/lib/module/home_notes/notes/note/home_note_controller.dart +++ b/src/lib/module/home_notes/notes/note/home_note_controller.dart @@ -1,13 +1,12 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; - import 'package:leafy_launcher/base/controller/status_controller_base.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/leafy_notes_database.dart'; import 'package:leafy_launcher/resources/localization/l10n.dart'; import 'package:leafy_launcher/resources/localization/l10n_provider.dart'; import 'package:leafy_launcher/services/share/share_service.dart'; import 'package:leafy_launcher/services/toast/toast_service.dart'; import 'package:leafy_launcher/shared_widget/context_menu/context_menu_route.dart'; -import 'package:leafy_notes_database/leafy_notes_database.dart'; class HomeNoteController extends StatusControllerBase { HomeNoteController({ diff --git a/src/lib/module/home_notes/notes/notes/home_notes_controller.dart b/src/lib/module/home_notes/notes/notes/home_notes_controller.dart index 0503664..1377ad8 100644 --- a/src/lib/module/home_notes/notes/notes/home_notes_controller.dart +++ b/src/lib/module/home_notes/notes/notes/home_notes_controller.dart @@ -4,12 +4,12 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:leafy_launcher/base/controller/status_controller_base.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/leafy_notes_database.dart'; import 'package:leafy_launcher/resources/app_constants.dart'; import 'package:leafy_launcher/resources/localization/l10n.dart'; import 'package:leafy_launcher/resources/localization/l10n_provider.dart'; import 'package:leafy_launcher/resources/theme/home_theme.dart'; import 'package:leafy_launcher/utils/dialogs/input/input_dialog.dart'; -import 'package:leafy_notes_database/leafy_notes_database.dart'; import '../../../../app_routes.dart'; diff --git a/src/lib/module/home_notes/notes/notes/home_notes_page.dart b/src/lib/module/home_notes/notes/notes/home_notes_page.dart index 787fb58..e1c4990 100644 --- a/src/lib/module/home_notes/notes/notes/home_notes_page.dart +++ b/src/lib/module/home_notes/notes/notes/home_notes_page.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:leafy_launcher/base/page/status_page_base.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/leafy_notes_database.dart'; import 'package:leafy_launcher/resources/app_constants.dart'; import 'package:leafy_launcher/resources/theme/home_theme.dart'; import 'package:leafy_launcher/resources/theme/leafy_theme.dart'; -import 'package:leafy_notes_database/leafy_notes_database.dart'; import 'home_notes_controller.dart'; import 'widget/list/home_notes_list.dart'; diff --git a/src/lib/module/home_notes/notes/notes/widget/list/home_note_container.dart b/src/lib/module/home_notes/notes/notes/widget/list/home_note_container.dart index d63b2e3..bbfc1ef 100644 --- a/src/lib/module/home_notes/notes/notes/widget/list/home_note_container.dart +++ b/src/lib/module/home_notes/notes/notes/widget/list/home_note_container.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/leafy_notes_database.dart'; import 'package:leafy_launcher/resources/theme/home_theme.dart'; import 'package:leafy_launcher/resources/theme/leafy_theme.dart'; import 'package:leafy_launcher/shared_widget/section/leafy_text_section_item.dart'; import 'package:leafy_launcher/shared_widget/themed_widget.dart'; -import 'package:leafy_notes_database/leafy_notes_database.dart'; import '../../home_notes_page.dart'; diff --git a/src/lib/module/home_notes/notes/notes/widget/list/home_notes_list.dart b/src/lib/module/home_notes/notes/notes/widget/list/home_notes_list.dart index 7859c62..6d421ee 100644 --- a/src/lib/module/home_notes/notes/notes/widget/list/home_notes_list.dart +++ b/src/lib/module/home_notes/notes/notes/widget/list/home_notes_list.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/leafy_notes_database.dart'; import 'package:leafy_launcher/module/home/utils/gesture_processer.dart'; import 'package:leafy_launcher/module/home_notes/notes/notes/home_notes_controller.dart'; import 'package:leafy_launcher/module/home_notes/notes/notes/home_notes_page.dart'; @@ -8,7 +9,6 @@ import 'package:leafy_launcher/shared_widget/list/dismissible_delete_background. import 'package:leafy_launcher/shared_widget/section/leafy_section.dart'; import 'package:leafy_launcher/shared_widget/themed_get_widget.dart'; import 'package:leafy_launcher/shared_widget/themed_widget.dart'; -import 'package:leafy_notes_database/leafy_notes_database.dart'; import 'home_note_container.dart'; diff --git a/src/lib/module/home_notes/notes/notes/widget/title/home_notes_title.dart b/src/lib/module/home_notes/notes/notes/widget/title/home_notes_title.dart index 96d9d12..8678e34 100644 --- a/src/lib/module/home_notes/notes/notes/widget/title/home_notes_title.dart +++ b/src/lib/module/home_notes/notes/notes/widget/title/home_notes_title.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:leafy_launcher/database/leafy_notes_db/leafy_notes_database.dart'; import 'package:leafy_launcher/module/home_notes/notes/folders/home_note_folders_page.dart'; import 'package:leafy_launcher/module/home_notes/notes/notes/home_notes_controller.dart'; import 'package:leafy_launcher/resources/app_constants.dart'; @@ -7,7 +8,6 @@ import 'package:leafy_launcher/resources/theme/leafy_theme.dart'; import 'package:leafy_launcher/shared_widget/leafy_spacer.dart'; import 'package:leafy_launcher/shared_widget/leafy_text_button.dart'; import 'package:leafy_launcher/shared_widget/themed_get_widget.dart'; -import 'package:leafy_notes_database/leafy_notes_database.dart'; class HomeNotesTitle extends ThemedGetWidget { const HomeNotesTitle({ diff --git a/src/pubspec.lock b/src/pubspec.lock index f228958..4a231b1 100644 --- a/src/pubspec.lock +++ b/src/pubspec.lock @@ -198,7 +198,7 @@ packages: source: hosted version: "0.0.3" equatable: - dependency: transitive + dependency: "direct main" description: name: equatable url: "https://pub.dartlang.org" @@ -329,13 +329,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.3.0" - leafy_notes_database: - dependency: "direct main" - description: - path: leafy_notes_db - relative: true - source: path - version: "1.0.0" lint: dependency: "direct main" description: @@ -393,7 +386,7 @@ packages: source: hosted version: "4.6.1+1" moor_flutter: - dependency: transitive + dependency: "direct main" description: name: moor_flutter url: "https://pub.dartlang.org" @@ -599,7 +592,7 @@ packages: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "2.0.0+4" + version: "2.0.1" sqflite_common: dependency: transitive description: @@ -614,13 +607,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.1" - sqlite3_flutter_libs: - dependency: transitive - description: - name: sqlite3_flutter_libs - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.1" sqlparser: dependency: transitive description: diff --git a/src/pubspec.yaml b/src/pubspec.yaml index 6830c3c..382ac6e 100644 --- a/src/pubspec.yaml +++ b/src/pubspec.yaml @@ -12,19 +12,16 @@ dependencies: assorted_layout_widgets: ^5.2.1 build_runner: ^2.1.4 ensure_initialized: ^0.0.3 + equatable: ^2.0.3 flutter: sdk: flutter flutter_localizations: sdk: flutter fluttertoast: ^8.0.8 intl: ^0.17.0 - - leafy_notes_database: - path: - leafy_notes_db - lint: ^1.5.3 logger: ^1.0.0 + moor_flutter: ^4.0.0 path_provider: ^2.0.2 share: ^2.0.4 shared_preferences: ^2.0.6 From 9031b38d482d281434d2f43b14f15699ac03c2be Mon Sep 17 00:00:00 2001 From: Nikita Sirovsky Date: Wed, 8 Dec 2021 08:51:06 +0200 Subject: [PATCH 2/2] Bump 1.2.1 --- README.md | 2 +- src/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e650dc..97060e2 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A new Android Launcher built with Flutter. [code-factor--badge-url]: https://www.codefactor.io/repository/github/nivisi/leafylauncher/badge?s=12760533a8fde6261b394c1023a0e4e8e3ca6a7a [code-factor-app-url]: https://www.codefactor.io/repository/github/nivisi/leafylauncher -[app-version-img]: https://img.shields.io/badge/version-1.2.0_beta-green +[app-version-img]: https://img.shields.io/badge/version-1.2.1_beta-green [ci-badge-url]: https://github.com/nivisi/LeafyLauncher/actions/workflows/leafy_ci.yml/badge.svg?branch=develop [ci-url]: https://github.com/nivisi/LeafyLauncher/actions/workflows/leafy_ci.yml diff --git a/src/pubspec.yaml b/src/pubspec.yaml index 382ac6e..0234e62 100644 --- a/src/pubspec.yaml +++ b/src/pubspec.yaml @@ -3,7 +3,7 @@ description: A new Flutter project. publish_to: 'none' -version: 1.2.0 +version: 1.2.1 environment: sdk: ">=2.12.0 <3.0.0"