LunchPick(오늘 뭐 먹Z?) Flutter 앱의 초기 구현입니다. 주요 기능: - 네이버 지도 연동 맛집 추가 - 랜덤 메뉴 추천 시스템 - 날씨 기반 거리 조정 - 방문 기록 관리 - Bluetooth 맛집 공유 - 다크모드 지원 기술 스택: - Flutter 3.8.1+ - Riverpod 상태 관리 - Hive 로컬 DB - Clean Architecture 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
45 lines
1.2 KiB
Dart
45 lines
1.2 KiB
Dart
import 'package:hive/hive.dart';
|
|
|
|
part 'user_settings.g.dart';
|
|
|
|
@HiveType(typeId: 4)
|
|
class UserSettings {
|
|
@HiveField(0)
|
|
final int revisitPreventionDays;
|
|
|
|
@HiveField(1)
|
|
final bool notificationEnabled;
|
|
|
|
@HiveField(2)
|
|
final String notificationTime;
|
|
|
|
@HiveField(3)
|
|
final Map<String, double> categoryWeights;
|
|
|
|
@HiveField(4)
|
|
final int notificationDelayMinutes;
|
|
|
|
UserSettings({
|
|
this.revisitPreventionDays = 7,
|
|
this.notificationEnabled = true,
|
|
this.notificationTime = "14:00",
|
|
Map<String, double>? categoryWeights,
|
|
this.notificationDelayMinutes = 90,
|
|
}) : categoryWeights = categoryWeights ?? {};
|
|
|
|
UserSettings copyWith({
|
|
int? revisitPreventionDays,
|
|
bool? notificationEnabled,
|
|
String? notificationTime,
|
|
Map<String, double>? categoryWeights,
|
|
int? notificationDelayMinutes,
|
|
}) {
|
|
return UserSettings(
|
|
revisitPreventionDays: revisitPreventionDays ?? this.revisitPreventionDays,
|
|
notificationEnabled: notificationEnabled ?? this.notificationEnabled,
|
|
notificationTime: notificationTime ?? this.notificationTime,
|
|
categoryWeights: categoryWeights ?? this.categoryWeights,
|
|
notificationDelayMinutes: notificationDelayMinutes ?? this.notificationDelayMinutes,
|
|
);
|
|
}
|
|
} |