From 8b79923e4c3b59739f13879acc184f8af82fe2ea Mon Sep 17 00:00:00 2001 From: AbdAlftahSalem Date: Tue, 5 Sep 2023 20:57:28 +0300 Subject: [PATCH] Remove amin path --- lib/files_creator/create_module_files.dart | 20 +++---- lib/files_creator/init_folders.dart | 66 +++++++++++----------- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/lib/files_creator/create_module_files.dart b/lib/files_creator/create_module_files.dart index efd52e0..48d4a79 100644 --- a/lib/files_creator/create_module_files.dart +++ b/lib/files_creator/create_module_files.dart @@ -19,39 +19,39 @@ class CreateModuleFiles { _generateFiles(String name) { // create modules folder CreateFolderAndFiles() - .createFolder('E:/Flutter new/crypto_new/lib/app/modules'); + .createFolder('app/modules'); // create home folder CreateFolderAndFiles().createFolder( - 'E:/Flutter new/crypto_new/lib/app/modules/${name.toLowerCase()}'); + 'app/modules/${name.toLowerCase()}'); // create binding folder CreateFolderAndFiles().createFolder( - 'E:/Flutter new/crypto_new/lib/app/modules/${name.toLowerCase()}/binding'); + 'app/modules/${name.toLowerCase()}/binding'); // create home binding file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/modules/${name.toLowerCase()}/binding/${name.toLowerCase()}_binding.dart', + 'app/modules/${name.toLowerCase()}/binding/${name.toLowerCase()}_binding.dart', ConstStrings.instance.binding(name), ); // controller folder CreateFolderAndFiles().createFolder( - 'E:/Flutter new/crypto_new/lib/app/modules/${name.toLowerCase()}/controller'); + 'app/modules/${name.toLowerCase()}/controller'); // create home controller file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/modules/${name.toLowerCase()}/controller/${name.toLowerCase()}_controller.dart', + 'app/modules/${name.toLowerCase()}/controller/${name.toLowerCase()}_controller.dart', ConstStrings.instance.controller(name.toCamelCase()), ); // create view folder CreateFolderAndFiles().createFolder( - 'E:/Flutter new/crypto_new/lib/app/modules/${name.toLowerCase()}/view'); + 'app/modules/${name.toLowerCase()}/view'); // create home view file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/modules/${name.toLowerCase()}/view/${name.toLowerCase()}_view.dart', + 'app/modules/${name.toLowerCase()}/view/${name.toLowerCase()}_view.dart', ConstStrings.instance.view(name), ); @@ -69,7 +69,7 @@ class CreateModuleFiles { // reading routes file final routesFile = - File('E:/Flutter new/crypto_new/lib/app/routes/routes.dart'); + File('app/routes/routes.dart'); // reading routes file content String routesContent = routesFile.readAsStringSync(); @@ -106,7 +106,7 @@ class Routes { void _addAppRout(String name) { // reading app_routes.dart file final file = - File('E:/Flutter new/crypto_new/lib/app/routes/app_routes.dart'); + File('app/routes/app_routes.dart'); String content = file.readAsStringSync(); // extract all imports from code diff --git a/lib/files_creator/init_folders.dart b/lib/files_creator/init_folders.dart index 6373f1f..fbe6796 100644 --- a/lib/files_creator/init_folders.dart +++ b/lib/files_creator/init_folders.dart @@ -24,7 +24,7 @@ class InitFolders { // set up main file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/main.dart', + 'main.dart', ConstStrings.instance.main, ); } @@ -56,13 +56,13 @@ class InitFolders { Future _setUpAllFolders() async { // create app folder - CreateFolderAndFiles().createFolder('E:/Flutter new/crypto_new/lib/app'); + CreateFolderAndFiles().createFolder('app'); // create utils folder - CreateFolderAndFiles().createFolder('E:/Flutter new/crypto_new/lib/utils'); + CreateFolderAndFiles().createFolder('utils'); // create config folder - CreateFolderAndFiles().createFolder('E:/Flutter new/crypto_new/lib/config'); + CreateFolderAndFiles().createFolder('config'); print("Create base folders successfully 🚀🚀"); @@ -86,17 +86,17 @@ class InitFolders { _setUpRoutesFolder() async { // create routes folder CreateFolderAndFiles() - .createFolder('E:/Flutter new/crypto_new/lib/app/routes'); + .createFolder('app/routes'); // create app_routes file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/routes/app_routes.dart', + 'app/routes/app_routes.dart', '', ); // create routes file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/routes/routes.dart', + 'app/routes/routes.dart', '', ); } @@ -104,19 +104,19 @@ class InitFolders { Future _setUpDateFolder() async { // create data folder CreateFolderAndFiles() - .createFolder('E:/Flutter new/crypto_new/lib/app/data'); + .createFolder('app/data'); CreateFolderAndFiles() - .createFolder('E:/Flutter new/crypto_new/lib/app/data/local'); + .createFolder('app/data/local'); // create my_shared_pref file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/data/local/my_shared_pref.dart', + 'app/data/local/my_shared_pref.dart', ConstStrings.instance.sharedPrefs, ); // create hive file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/data/local/hive.dart', + 'app/data/local/hive.dart', ConstStrings.instance.hive, ); @@ -126,23 +126,23 @@ class InitFolders { // create remote folder CreateFolderAndFiles() - .createFolder('E:/Flutter new/crypto_new/lib/app/data/remote'); + .createFolder('app/data/remote'); // create api_call_status file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/data/remote/api_call_status.dart', + 'app/data/remote/api_call_status.dart', ConstStrings.instance.apiCallStatus, ); // create api_exceptions file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/data/remote/api_exceptions.dart', + 'app/data/remote/api_exceptions.dart', ConstStrings.instance.apiException, ); // create base_client file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/data/remote/base_client.dart', + 'app/data/remote/base_client.dart', ConstStrings.instance.baseClient, ); } @@ -150,24 +150,24 @@ class InitFolders { Future _setUpComponentsFolder() async { // create components folder CreateFolderAndFiles().createFolder( - 'E:/Flutter new/crypto_new/lib/app/components', + 'app/components', ); // create api_error_widget file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/components/api_error_widget.dart', + 'app/components/api_error_widget.dart', ConstStrings.instance.apiErrorWidget, ); // create custom_snackbar file CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/components/custom_snackbar.dart', + 'app/components/custom_snackbar.dart', ConstStrings.instance.snackbar, ); // create animated widget CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/app/components/animated_widget.dart', + 'app/components/animated_widget.dart', ConstStrings.instance.animatedWidget, ); @@ -179,19 +179,19 @@ class InitFolders { void _setUpUtilFiles() async { // create file in util folder CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/utils/constants.dart', + 'utils/constants.dart', ConstStrings.instance.constsApp, ); // init AwesomeNotifications CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/utils/awesome_notifications_helper.dart', + 'utils/awesome_notifications_helper.dart', ConstStrings.instance.awesomeNotifications, ); // init FcmHelper CreateFolderAndFiles().createFile( - 'E:/Flutter new/crypto_new/lib/utils/fcm_helper.dart', + 'utils/fcm_helper.dart', ConstStrings.instance.fcmHelper, ); @@ -213,62 +213,62 @@ class InitFolders { void _setUpTheme() { // create dark_theme_colors CreateFolderAndFiles() - .createFolder("E:/Flutter new/crypto_new/lib/config/theme"); + .createFolder("config/theme"); CreateFolderAndFiles().createFile( - "E:/Flutter new/crypto_new/lib/config/theme/dark_theme_colors.dart", + "config/theme/dark_theme_colors.dart", ConstStrings.instance.darkTheme, ); // create light_theme_colors CreateFolderAndFiles().createFile( - "E:/Flutter new/crypto_new/lib/config/theme/light_theme_colors.dart", + "config/theme/light_theme_colors.dart", ConstStrings.instance.lightTheme, ); // create my_fonts CreateFolderAndFiles().createFile( - "E:/Flutter new/crypto_new/lib/config/theme/my_fonts.dart", + "config/theme/my_fonts.dart", ConstStrings.instance.myFonts, ); // create myStyle CreateFolderAndFiles().createFile( - "E:/Flutter new/crypto_new/lib/config/theme/my_styles.dart", + "config/theme/my_styles.dart", ConstStrings.instance.myStyle, ); // create myTheme CreateFolderAndFiles().createFile( - "E:/Flutter new/crypto_new/lib/config/theme/my_theme.dart", + "config/theme/my_theme.dart", ConstStrings.instance.myTheme, ); } void _setUpTranslations() { CreateFolderAndFiles() - .createFolder("E:/Flutter new/crypto_new/lib/config/translations"); + .createFolder("config/translations"); // create localization_service CreateFolderAndFiles().createFile( - "E:/Flutter new/crypto_new/lib/config/translations/localization_service.dart", + "config/translations/localization_service.dart", ConstStrings.instance.localizationService, ); // create strings file CreateFolderAndFiles().createFile( - "E:/Flutter new/crypto_new/lib/config/translations/strings.dart", + "config/translations/strings.dart", ConstStrings.instance.strings, ); // create en_us_translation CreateFolderAndFiles().createFile( - "E:/Flutter new/crypto_new/lib/config/translations/ar_Ar_translation.dart", + "config/translations/ar_Ar_translation.dart", ConstStrings.instance.arAr, ); // create ar_ar_translation CreateFolderAndFiles().createFile( - "E:/Flutter new/crypto_new/lib/config/translations/ar_En_translation.dart", + "config/translations/ar_En_translation.dart", ConstStrings.instance.enUs, ); }