chore: update device_preview_plus version to 2.5.6, change Flutter build mode to debug, adjust image picker widget color opacity, and clean up unused assets script formatting
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/// اسکریپت برای بررسی Assets استفاده نشده
|
||||
///
|
||||
///
|
||||
/// استفاده:
|
||||
/// dart run tools/check_unused_assets.dart
|
||||
|
||||
@@ -10,7 +10,7 @@ void main() async {
|
||||
|
||||
// لیست تمام assets
|
||||
final assets = <String>[];
|
||||
|
||||
|
||||
// خواندن assets از پوشهها
|
||||
final assetDirs = [
|
||||
'assets/icons',
|
||||
@@ -46,12 +46,12 @@ void main() async {
|
||||
|
||||
for (final file in codeFiles) {
|
||||
final content = await file.readAsString();
|
||||
|
||||
|
||||
for (final asset in assets) {
|
||||
// استخراج نام فایل از مسیر
|
||||
final fileName = asset.split('/').last;
|
||||
final fileNameWithoutExt = fileName.split('.').first;
|
||||
|
||||
|
||||
// جستجوی استفاده در کد
|
||||
if (content.contains(asset) ||
|
||||
content.contains(fileName) ||
|
||||
@@ -63,7 +63,9 @@ void main() async {
|
||||
}
|
||||
|
||||
// پیدا کردن assets استفاده نشده
|
||||
final unusedAssets = assets.where((asset) => !usedAssets.contains(asset)).toList();
|
||||
final unusedAssets = assets
|
||||
.where((asset) => !usedAssets.contains(asset))
|
||||
.toList();
|
||||
|
||||
print('✅ Assets استفاده شده: ${usedAssets.length}');
|
||||
print('❌ Assets استفاده نشده: ${unusedAssets.length}\n');
|
||||
@@ -97,4 +99,3 @@ String _getAssetCategory(String assetPath) {
|
||||
if (assetPath.contains('anim/')) return 'anim';
|
||||
return 'unknown';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user