feat(app): seed restaurants, geocode addresses, refresh sharing
This commit is contained in:
@@ -177,13 +177,19 @@ class WeatherRepositoryImpl implements WeatherRepository {
|
||||
WeatherInfo _weatherInfoFromMap(Map<String, dynamic> map) {
|
||||
try {
|
||||
// current 필드 검증
|
||||
final currentMap = map['current'] as Map<String, dynamic>?;
|
||||
final currentRaw = map['current'];
|
||||
final currentMap = currentRaw is Map
|
||||
? Map<String, dynamic>.from(currentRaw)
|
||||
: null;
|
||||
if (currentMap == null) {
|
||||
throw FormatException('Missing current weather data');
|
||||
}
|
||||
|
||||
// nextHour 필드 검증
|
||||
final nextHourMap = map['nextHour'] as Map<String, dynamic>?;
|
||||
final nextHourRaw = map['nextHour'];
|
||||
final nextHourMap = nextHourRaw is Map
|
||||
? Map<String, dynamic>.from(nextHourRaw)
|
||||
: null;
|
||||
if (nextHourMap == null) {
|
||||
throw FormatException('Missing nextHour weather data');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user