From a392716d0a5666d1ca6be2b97d6c2e619b3b9f0f Mon Sep 17 00:00:00 2001 From: Godsend Joseph Date: Thu, 22 Feb 2024 23:51:15 +0100 Subject: [PATCH] did some little refactoring --- lib/app/{screens => resources/home/controller}/home.dart | 9 ++++----- .../home/views}/cloud_notes/cloud_notes.dart | 0 .../home/views}/local_notes/create_note_screen.dart | 4 ++-- .../home/views}/local_notes/edit_note_screen.dart | 4 ++-- .../home/views}/local_notes/local_notes.dart | 4 ++-- .../home/views}/local_notes/read_notes_screens.dart | 4 ++-- .../notifications/notifications_view.dart | 0 .../settings/controller}/settings_screen.dart | 2 +- .../trash/controller}/trashed_notes.dart | 2 +- lib/app/src/app.dart | 4 ++-- lib/main.dart | 2 +- lib/{ => utils}/const_values.dart | 0 lib/{ => utils}/custom_theme.dart | 2 +- 13 files changed, 18 insertions(+), 19 deletions(-) rename lib/app/{screens => resources/home/controller}/home.dart (96%) rename lib/app/{screens => resources/home/views}/cloud_notes/cloud_notes.dart (100%) rename lib/app/{screens => resources/home/views}/local_notes/create_note_screen.dart (97%) rename lib/app/{screens => resources/home/views}/local_notes/edit_note_screen.dart (97%) rename lib/app/{screens => resources/home/views}/local_notes/local_notes.dart (99%) rename lib/app/{screens => resources/home/views}/local_notes/read_notes_screens.dart (97%) rename lib/app/{screens => resources}/notifications/notifications_view.dart (100%) rename lib/app/{screens => resources/settings/controller}/settings_screen.dart (99%) rename lib/app/{screens/trash_screen => resources/trash/controller}/trashed_notes.dart (99%) rename lib/{ => utils}/const_values.dart (100%) rename lib/{ => utils}/custom_theme.dart (98%) diff --git a/lib/app/screens/home.dart b/lib/app/resources/home/controller/home.dart similarity index 96% rename from lib/app/screens/home.dart rename to lib/app/resources/home/controller/home.dart index ea2cfa3..a5b484f 100644 --- a/lib/app/screens/home.dart +++ b/lib/app/resources/home/controller/home.dart @@ -6,17 +6,16 @@ import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:hive/hive.dart'; import 'package:hive_flutter/hive_flutter.dart'; -import 'package:note_app/app/screens/local_notes/local_notes.dart'; -import 'package:note_app/app/screens/notifications/notifications_view.dart'; -import 'package:note_app/app/screens/settings_screen.dart'; -import 'package:note_app/const_values.dart'; +import 'package:note_app/app/resources/home/views/local_notes/local_notes.dart'; +import 'package:note_app/app/resources/settings/controller/settings_screen.dart'; +import 'package:note_app/utils/const_values.dart'; import 'package:note_app/models/note_model.dart'; import 'package:note_app/providers/theme_provider.dart'; import 'package:note_app/utils/greetings.dart'; import 'package:note_app/utils/slide_transition.dart'; import 'package:provider/provider.dart'; -import 'local_notes/create_note_screen.dart'; +import '../views/local_notes/create_note_screen.dart'; class HomeScreen extends StatefulWidget { const HomeScreen({Key? key}) : super(key: key); diff --git a/lib/app/screens/cloud_notes/cloud_notes.dart b/lib/app/resources/home/views/cloud_notes/cloud_notes.dart similarity index 100% rename from lib/app/screens/cloud_notes/cloud_notes.dart rename to lib/app/resources/home/views/cloud_notes/cloud_notes.dart diff --git a/lib/app/screens/local_notes/create_note_screen.dart b/lib/app/resources/home/views/local_notes/create_note_screen.dart similarity index 97% rename from lib/app/screens/local_notes/create_note_screen.dart rename to lib/app/resources/home/views/local_notes/create_note_screen.dart index 3dde5c8..c9a3cf4 100644 --- a/lib/app/screens/local_notes/create_note_screen.dart +++ b/lib/app/resources/home/views/local_notes/create_note_screen.dart @@ -4,8 +4,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:hive/hive.dart'; -import 'package:note_app/app/screens/local_notes/local_notes.dart'; -import 'package:note_app/const_values.dart'; +import 'package:note_app/app/resources/home/views/local_notes/local_notes.dart'; +import 'package:note_app/utils/const_values.dart'; import 'package:note_app/models/note_model.dart'; import 'package:note_app/providers/theme_provider.dart'; import 'package:note_app/utils/slide_transition.dart'; diff --git a/lib/app/screens/local_notes/edit_note_screen.dart b/lib/app/resources/home/views/local_notes/edit_note_screen.dart similarity index 97% rename from lib/app/screens/local_notes/edit_note_screen.dart rename to lib/app/resources/home/views/local_notes/edit_note_screen.dart index 57a5d1e..d0fe83e 100644 --- a/lib/app/screens/local_notes/edit_note_screen.dart +++ b/lib/app/resources/home/views/local_notes/edit_note_screen.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:hive/hive.dart'; -import 'package:note_app/app/screens/local_notes/read_notes_screens.dart'; -import 'package:note_app/const_values.dart'; +import 'package:note_app/app/resources/home/views/local_notes/read_notes_screens.dart'; +import 'package:note_app/utils/const_values.dart'; import 'package:note_app/models/note_model.dart'; import 'package:note_app/providers/theme_provider.dart'; import 'package:note_app/utils/slide_transition.dart'; diff --git a/lib/app/screens/local_notes/local_notes.dart b/lib/app/resources/home/views/local_notes/local_notes.dart similarity index 99% rename from lib/app/screens/local_notes/local_notes.dart rename to lib/app/resources/home/views/local_notes/local_notes.dart index 70b4a7c..1a82280 100644 --- a/lib/app/screens/local_notes/local_notes.dart +++ b/lib/app/resources/home/views/local_notes/local_notes.dart @@ -6,8 +6,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import 'package:hive/hive.dart'; import 'package:hive_flutter/hive_flutter.dart'; -import 'package:note_app/app/screens/local_notes/read_notes_screens.dart'; -import 'package:note_app/const_values.dart'; +import 'package:note_app/app/resources/home/views/local_notes/read_notes_screens.dart'; +import 'package:note_app/utils/const_values.dart'; import 'package:note_app/models/note_model.dart'; import 'package:note_app/providers/change_view_style_provider.dart'; import 'package:note_app/providers/theme_provider.dart'; diff --git a/lib/app/screens/local_notes/read_notes_screens.dart b/lib/app/resources/home/views/local_notes/read_notes_screens.dart similarity index 97% rename from lib/app/screens/local_notes/read_notes_screens.dart rename to lib/app/resources/home/views/local_notes/read_notes_screens.dart index 6b002c9..ffedcd2 100644 --- a/lib/app/screens/local_notes/read_notes_screens.dart +++ b/lib/app/resources/home/views/local_notes/read_notes_screens.dart @@ -1,8 +1,8 @@ import 'dart:io' show Platform; import 'package:flutter/material.dart'; -import 'package:note_app/app/screens/local_notes/edit_note_screen.dart'; -import 'package:note_app/const_values.dart'; +import 'package:note_app/app/resources/home/views/local_notes/edit_note_screen.dart'; +import 'package:note_app/utils/const_values.dart'; import 'package:note_app/models/note_model.dart'; import 'package:note_app/providers/hide_play_button_provider.dart'; import 'package:note_app/utils/slide_transition.dart'; diff --git a/lib/app/screens/notifications/notifications_view.dart b/lib/app/resources/notifications/notifications_view.dart similarity index 100% rename from lib/app/screens/notifications/notifications_view.dart rename to lib/app/resources/notifications/notifications_view.dart diff --git a/lib/app/screens/settings_screen.dart b/lib/app/resources/settings/controller/settings_screen.dart similarity index 99% rename from lib/app/screens/settings_screen.dart rename to lib/app/resources/settings/controller/settings_screen.dart index 26e9275..b89b7ca 100644 --- a/lib/app/screens/settings_screen.dart +++ b/lib/app/resources/settings/controller/settings_screen.dart @@ -1,7 +1,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; -import 'package:note_app/app/screens/trash_screen/trashed_notes.dart'; +import 'package:note_app/app/resources/trash/controller/trashed_notes.dart'; import 'package:note_app/providers/hide_play_button_provider.dart'; import 'package:note_app/providers/theme_provider.dart'; import 'package:package_info_plus/package_info_plus.dart'; diff --git a/lib/app/screens/trash_screen/trashed_notes.dart b/lib/app/resources/trash/controller/trashed_notes.dart similarity index 99% rename from lib/app/screens/trash_screen/trashed_notes.dart rename to lib/app/resources/trash/controller/trashed_notes.dart index 3c0cb66..e54c83c 100644 --- a/lib/app/screens/trash_screen/trashed_notes.dart +++ b/lib/app/resources/trash/controller/trashed_notes.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hive/hive.dart'; -import 'package:note_app/const_values.dart'; +import 'package:note_app/utils/const_values.dart'; import 'package:note_app/models/note_model.dart'; import 'package:hive_flutter/hive_flutter.dart'; diff --git a/lib/app/src/app.dart b/lib/app/src/app.dart index fdf1d7a..42d9d65 100644 --- a/lib/app/src/app.dart +++ b/lib/app/src/app.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:note_app/app/screens/home.dart'; -import 'package:note_app/custom_theme.dart'; +import 'package:note_app/app/resources/home/controller/home.dart'; +import 'package:note_app/utils/custom_theme.dart'; import 'package:note_app/providers/theme_provider.dart'; import 'package:provider/provider.dart'; diff --git a/lib/main.dart b/lib/main.dart index fa9f5b6..7d996b6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hive/hive.dart'; import 'package:note_app/app/src/app.dart'; -import 'package:note_app/const_values.dart'; +import 'package:note_app/utils/const_values.dart'; import 'package:note_app/models/note_model.dart'; import 'package:note_app/providers/change_view_style_provider.dart'; import 'package:note_app/providers/hide_play_button_provider.dart'; diff --git a/lib/const_values.dart b/lib/utils/const_values.dart similarity index 100% rename from lib/const_values.dart rename to lib/utils/const_values.dart diff --git a/lib/custom_theme.dart b/lib/utils/custom_theme.dart similarity index 98% rename from lib/custom_theme.dart rename to lib/utils/custom_theme.dart index 92b73f3..09ecab6 100644 --- a/lib/custom_theme.dart +++ b/lib/utils/custom_theme.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:note_app/const_values.dart'; +import 'package:note_app/utils/const_values.dart'; ThemeData buildLightTheme() => ThemeData.light().copyWith( cardColor: Colors.white,