From d3eb50f709d6c591507c48774ab7037d449dbe79 Mon Sep 17 00:00:00 2001 From: vb10 Date: Fri, 3 Jan 2025 05:18:52 +0300 Subject: [PATCH] Update dependencies, enhance localization, and modify project structure - Updated various package versions in pubspec.lock to their latest releases for improved functionality and security. - Added localization support in HomeAppBar and updated the supported locales in ProductLocalization. - Modified the lang.sh script to use 'flutter pub run' for generating localization keys, ensuring compatibility with Flutter projects. - Updated .gitignore to include new build-related directories. --- .gitignore | 2 + ios/Podfile.lock | 10 ---- .../home/view/widget/home_app_bar.dart | 7 +++ lib/product/init/product_localization.dart | 2 +- pubspec.lock | 56 +++++++++---------- script/lang.sh | 2 +- 6 files changed, 39 insertions(+), 40 deletions(-) diff --git a/.gitignore b/.gitignore index 164b425..ba94254 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,11 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ migrate_working_dir/ *.env diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0a281a5..9a593b4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,8 +1,5 @@ PODS: - CocoaAsyncSocket (7.6.5) - - connectivity_plus (0.0.1): - - Flutter - - ReachabilitySwift - device_info_plus (0.0.1): - Flutter - Flutter (1.0.0) @@ -19,7 +16,6 @@ PODS: - CocoaAsyncSocket (~> 7.6) - Flutter - FlutterMacOS - - ReachabilitySwift (5.0.0) - share_plus (0.0.1): - Flutter - shared_preferences_foundation (0.0.1): @@ -32,7 +28,6 @@ PODS: - Flutter DEPENDENCIES: - - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - Flutter (from `Flutter`) - integration_test (from `.symlinks/plugins/integration_test/ios`) @@ -48,11 +43,8 @@ DEPENDENCIES: SPEC REPOS: trunk: - CocoaAsyncSocket - - ReachabilitySwift EXTERNAL SOURCES: - connectivity_plus: - :path: ".symlinks/plugins/connectivity_plus/ios" device_info_plus: :path: ".symlinks/plugins/device_info_plus/ios" Flutter: @@ -78,7 +70,6 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 - connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 @@ -86,7 +77,6 @@ SPEC CHECKSUMS: package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 patrol: 0564cee315ff6c86fb802b3647db05cc2d3d0624 - ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 sqflite_darwin: a553b1fd6fe66f53bbb0fe5b4f5bab93f08d7a13 diff --git a/lib/feature/home/view/widget/home_app_bar.dart b/lib/feature/home/view/widget/home_app_bar.dart index c2eecb2..db3faba 100644 --- a/lib/feature/home/view/widget/home_app_bar.dart +++ b/lib/feature/home/view/widget/home_app_bar.dart @@ -1,7 +1,10 @@ import 'package:architecture_template_v2/feature/home/view_model/home_view_model.dart'; import 'package:architecture_template_v2/feature/home/view_model/state/home_state.dart'; +import 'package:architecture_template_v2/product/init/language/locale_keys.g.dart'; +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:gen/gen.dart'; class HomeAppBar extends StatelessWidget implements PreferredSizeWidget { const HomeAppBar({super.key}); @@ -9,6 +12,10 @@ class HomeAppBar extends StatelessWidget implements PreferredSizeWidget { @override Widget build(BuildContext context) { return AppBar( + leading: Assets.icons.icLove.svg( + package: 'gen', + ), + title: Text(LocaleKeys.home_title.tr()), actions: const [ _Loading(), ], diff --git a/lib/product/init/product_localization.dart b/lib/product/init/product_localization.dart index 68e9cb0..c70baa6 100644 --- a/lib/product/init/product_localization.dart +++ b/lib/product/init/product_localization.dart @@ -17,8 +17,8 @@ final class ProductLocalization extends EasyLocalization { ); static final List _supportedItems = [ - Locales.tr.locale, Locales.en.locale, + Locales.tr.locale, ]; static const String _translationPath = 'asset/translations'; diff --git a/pubspec.lock b/pubspec.lock index 9f93471..88a3570 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,23 +5,23 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 + sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" url: "https://pub.dev" source: hosted - version: "72.0.0" + version: "76.0.0" _macros: dependency: transitive description: dart source: sdk - version: "0.3.2" + version: "0.3.3" analyzer: dependency: transitive description: name: analyzer - sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 + sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" url: "https://pub.dev" source: hosted - version: "6.7.0" + version: "6.11.0" archive: dependency: transitive description: @@ -218,10 +218,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" common: dependency: "direct main" description: @@ -650,18 +650,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -698,10 +698,10 @@ packages: dependency: transitive description: name: macros - sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" url: "https://pub.dev" source: hosted - version: "0.1.2-main.4" + version: "0.1.3-main.0" mask_text_input_formatter: dependency: transitive description: @@ -1082,7 +1082,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_gen: dependency: transitive description: @@ -1167,10 +1167,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" stream_channel: dependency: transitive description: @@ -1191,10 +1191,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" sync_http: dependency: transitive description: @@ -1223,26 +1223,26 @@ packages: dependency: transitive description: name: test - sha256: "7ee44229615f8f642b68120165ae4c2a75fe77ae2065b1e55ae4711f6cf0899e" + sha256: "713a8789d62f3233c46b4a90b174737b2c04cb6ae4500f2aa8b1be8f03f5e67f" url: "https://pub.dev" source: hosted - version: "1.25.7" + version: "1.25.8" test_api: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" test_core: dependency: transitive description: name: test_core - sha256: "55ea5a652e38a1dfb32943a7973f3681a60f872f8c3a05a14664ad54ef9c6696" + sha256: "12391302411737c176b0b5d6491f466b0dd56d4763e347b6714efbaa74d7953d" url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.5" timing: dependency: transitive description: @@ -1383,10 +1383,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.0" watcher: dependency: transitive description: @@ -1423,10 +1423,10 @@ packages: dependency: transitive description: name: webdriver - sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.4" webkit_inspection_protocol: dependency: transitive description: diff --git a/script/lang.sh b/script/lang.sh index a71c4de..ca82758 100644 --- a/script/lang.sh +++ b/script/lang.sh @@ -1,3 +1,3 @@ #!/bin/bash -dart run easy_localization:generate -O lib/product/init/language -f keys -o locale_keys.g.dart --source-dir asset/translations +flutter pub run easy_localization:generate -O lib/product/init/language -f keys -o locale_keys.g.dart --source-dir asset/translations