Features: - Beacon scanner service for detecting nearby beacons - Beacon cache for offline-first beacon resolution - Preload cache for instant menu display - Business selector screen for multi-location support - Rescan button widget for quick beacon refresh - Sign-in dialog for guest checkout flow - Task type model for server tasks Improvements: - Enhanced menu browsing with category filtering - Improved cart view with better modifier display - Order history with detailed order tracking - Chat screen improvements - Better error handling in API service Fixes: - CashApp payment return crash fix - Modifier nesting issues resolved - Auto-expand modifier groups Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
27 lines
731 B
Dart
27 lines
731 B
Dart
class Restaurant {
|
|
final int businessId;
|
|
final String name;
|
|
final String city;
|
|
final String address;
|
|
final double? distanceMiles;
|
|
|
|
const Restaurant({
|
|
required this.businessId,
|
|
required this.name,
|
|
this.city = "",
|
|
this.address = "",
|
|
this.distanceMiles,
|
|
});
|
|
|
|
factory Restaurant.fromJson(Map<String, dynamic> json) {
|
|
return Restaurant(
|
|
businessId: (json["BusinessID"] as num).toInt(),
|
|
name: (json["BusinessName"] as String?) ?? "Unnamed",
|
|
city: (json["AddressCity"] as String?) ?? "",
|
|
address: (json["AddressLine1"] as String?) ?? "",
|
|
distanceMiles: json["DistanceMiles"] != null
|
|
? (json["DistanceMiles"] as num).toDouble()
|
|
: null,
|
|
);
|
|
}
|
|
}
|