diff --git a/.gitignore b/.gitignore index 67fb226..346f613 100644 --- a/.gitignore +++ b/.gitignore @@ -74,3 +74,4 @@ Desktop.ini # Temporary files *.tmp *.bak +analyze_output*.txt diff --git a/analysis_options.yaml b/analysis_options.yaml index 0d29021..d7c8b3b 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -9,6 +9,11 @@ # packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml +analyzer: + exclude: + - "scripts/**" + - "tools/**" + linter: # The lint rules applied to this project can be customized in the # section below to disable rules from the `package:flutter_lints/flutter.yaml` diff --git a/lib/models/sake_item.dart b/lib/models/sake_item.dart index 4034836..26167f2 100644 --- a/lib/models/sake_item.dart +++ b/lib/models/sake_item.dart @@ -223,6 +223,7 @@ class SakeItem extends HiveObject { _isPendingAnalysis = val; } + // ignore: unnecessary_getters_setters String? get draftPhotoPath => _draftPhotoPath; set draftPhotoPath(String? val) { diff --git a/lib/models/user_profile.dart b/lib/models/user_profile.dart index 9d3bfdd..95b787d 100644 --- a/lib/models/user_profile.dart +++ b/lib/models/user_profile.dart @@ -63,17 +63,7 @@ class UserProfile extends HiveObject { List unlockedBadges; // DEPRECATED: Tutorial flags no longer used (simplified to guide screen only) - @HiveField(16, defaultValue: false) - @Deprecated('Tutorial system removed in favor of guide screen') - bool hasSeenCameraTutorial; - - @HiveField(17, defaultValue: false) - @Deprecated('Tutorial system removed in favor of guide screen') - bool hasSeenProfileTutorial; - - @HiveField(18, defaultValue: false) - @Deprecated('Tutorial system removed in favor of guide screen') - bool hasSeenSommelierTutorial; + // HiveField 16, 17, 18 removed. @HiveField(19, defaultValue: 'ja') String locale; // 'ja', 'en', 'fr', 'de' @@ -103,9 +93,6 @@ class UserProfile extends HiveObject { this.gender, this.totalExp = 0, this.unlockedBadges = const [], - this.hasSeenCameraTutorial = false, - this.hasSeenProfileTutorial = false, - this.hasSeenSommelierTutorial = false, this.locale = 'ja', this.colorVariant = 'washi_sumi_kohaku', }); @@ -146,10 +133,7 @@ class UserProfile extends HiveObject { gender: gender ?? this.gender, totalExp: totalExp ?? this.totalExp, unlockedBadges: unlockedBadges ?? this.unlockedBadges, - // Tutorial fields preserved in constructor for Hive compatibility - hasSeenCameraTutorial: this.hasSeenCameraTutorial, - hasSeenProfileTutorial: this.hasSeenProfileTutorial, - hasSeenSommelierTutorial: this.hasSeenSommelierTutorial, + // Tutorial fields removed locale: locale ?? this.locale, colorVariant: colorVariant ?? this.colorVariant, ); diff --git a/lib/models/user_profile.g.dart b/lib/models/user_profile.g.dart index c808e6d..2d9866e 100644 --- a/lib/models/user_profile.g.dart +++ b/lib/models/user_profile.g.dart @@ -33,9 +33,6 @@ class UserProfileAdapter extends TypeAdapter { totalExp: fields[14] == null ? 0 : fields[14] as int, unlockedBadges: fields[15] == null ? [] : (fields[15] as List).cast(), - hasSeenCameraTutorial: fields[16] == null ? false : fields[16] as bool, - hasSeenProfileTutorial: fields[17] == null ? false : fields[17] as bool, - hasSeenSommelierTutorial: fields[18] == null ? false : fields[18] as bool, locale: fields[19] == null ? 'ja' : fields[19] as String, colorVariant: fields[20] == null ? 'washi_sumi_kohaku' : fields[20] as String, @@ -45,7 +42,7 @@ class UserProfileAdapter extends TypeAdapter { @override void write(BinaryWriter writer, UserProfile obj) { writer - ..writeByte(20) + ..writeByte(17) ..writeByte(0) ..write(obj.fontPreference) ..writeByte(3) @@ -76,12 +73,6 @@ class UserProfileAdapter extends TypeAdapter { ..write(obj.totalExp) ..writeByte(15) ..write(obj.unlockedBadges) - ..writeByte(16) - ..write(obj.hasSeenCameraTutorial) - ..writeByte(17) - ..write(obj.hasSeenProfileTutorial) - ..writeByte(18) - ..write(obj.hasSeenSommelierTutorial) ..writeByte(19) ..write(obj.locale) ..writeByte(20) diff --git a/lib/screens/features/sommelier_screen.dart b/lib/screens/features/sommelier_screen.dart index 7d91ac1..f70f107 100644 --- a/lib/screens/features/sommelier_screen.dart +++ b/lib/screens/features/sommelier_screen.dart @@ -50,7 +50,8 @@ class _SommelierScreenState extends ConsumerState { final imagePath = await File('${directory.path}/sommelier_card.png').create(); await imagePath.writeAsBytes(image); - // Share the file + // Share the file (using deprecated Share API - migration to SharePlus planned) + // ignore: deprecated_member_use await Share.shareXFiles( [XFile(imagePath.path)], text: '私の酒向タイプはこれ! #ポンシュルーム', diff --git a/lib/services/sakenowa_similar_recommendation_service.dart b/lib/services/sakenowa_similar_recommendation_service.dart index 847d286..ffae5ed 100644 --- a/lib/services/sakenowa_similar_recommendation_service.dart +++ b/lib/services/sakenowa_similar_recommendation_service.dart @@ -152,7 +152,7 @@ class SakenowaSimilarRecommendationService { return '$label1と$label2が似ています'; } else if (topAxes.length == 1) { final label1 = axisLabels[topAxes[0].key] ?? topAxes[0].key; - return '${label1}が似ています'; + return '$label1が似ています'; } return '味わいが似ています'; diff --git a/lib/widgets/sakenowa/sakenowa_detail_recommendation_section.dart b/lib/widgets/sakenowa/sakenowa_detail_recommendation_section.dart index e3707d0..01d43ec 100644 --- a/lib/widgets/sakenowa/sakenowa_detail_recommendation_section.dart +++ b/lib/widgets/sakenowa/sakenowa_detail_recommendation_section.dart @@ -45,13 +45,13 @@ class SakenowaDetailRecommendationSection extends ConsumerWidget { userItems, ), loading: () => _buildLoading(), - error: (_, __) => const SizedBox.shrink(), + error: (err, stack) => const SizedBox.shrink(), ), loading: () => _buildLoading(), - error: (_, __) => const SizedBox.shrink(), + error: (err, stack) => const SizedBox.shrink(), ), loading: () => _buildLoading(), - error: (_, __) => const SizedBox.shrink(), + error: (err, stack) => const SizedBox.shrink(), ); } diff --git a/lib/widgets/sakenowa/sakenowa_ranking_section.dart b/lib/widgets/sakenowa/sakenowa_ranking_section.dart index 1c84e97..3d9c4e3 100644 --- a/lib/widgets/sakenowa/sakenowa_ranking_section.dart +++ b/lib/widgets/sakenowa/sakenowa_ranking_section.dart @@ -167,15 +167,15 @@ class _SakenowaRankingSectionState extends ConsumerState return _buildCarousel(context, displayItems, appColors); }, loading: () => _buildLoadingState(appColors), - error: (_, __) => _buildErrorState(context, appColors), + error: (err, stack) => _buildErrorState(context, appColors), ); }, loading: () => _buildLoadingState(appColors), - error: (_, __) => _buildErrorState(context, appColors), + error: (err, stack) => _buildErrorState(context, appColors), ); }, loading: () => _buildLoadingState(appColors), - error: (_, __) => _buildErrorState(context, appColors), + error: (err, stack) => _buildErrorState(context, appColors), ), ], ); diff --git a/pubspec.lock b/pubspec.lock index 78f2b5b..a0d4322 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1467,7 +1467,7 @@ packages: source: hosted version: "4.5.2" vector_math: - dependency: transitive + dependency: "direct main" description: name: vector_math sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b diff --git a/pubspec.yaml b/pubspec.yaml index 060acca..405a74a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -76,6 +76,7 @@ dependencies: carousel_slider: ^5.1.1 url_launcher: ^6.3.1 connectivity_plus: ^6.1.2 # Phase 1: オフライン検知 + vector_math: ^2.2.0 dev_dependencies: