phase3(foundation): http_util dio5 migration + null-safe models
- http_util.dart: dio4->5 (DioException, nullable params, drop unused statusCode, null-safe e.response!.data), countryCode ?? '' - models/* (39 files): make all instance fields nullable (fromJson initializer-list pattern forces nullable); fix internal method usages (cart_info/cart_line_item/ order/shipping_rate) with !/?? - models/ now passes dart analyze with 0 errors Widget-level null-safety + remaining utils/store continue in next batch.
This commit is contained in:
@@ -8,7 +8,7 @@ import 'product.dart';
|
||||
import 'waiting_line.dart';
|
||||
|
||||
class QuickInput {
|
||||
String value;
|
||||
String? value;
|
||||
QuickInput.fromJson(Map<String, dynamic> json)
|
||||
: value = json['value'];
|
||||
|
||||
@@ -23,48 +23,48 @@ class QuickInput {
|
||||
}
|
||||
|
||||
class Business {
|
||||
int id;
|
||||
String name;
|
||||
String phone;
|
||||
Address address;
|
||||
String fullAddress;
|
||||
String picUrl;
|
||||
int status;
|
||||
List<BusinessTime> openingTime;
|
||||
double shippingFee;
|
||||
double packageFee;
|
||||
double minPrice;
|
||||
int shippingTime;
|
||||
int monthSales;
|
||||
String bulletin;
|
||||
int category;
|
||||
bool isLike;
|
||||
String description;
|
||||
String policy;
|
||||
String bannerImageUrl;
|
||||
int todayOpen;
|
||||
int todayClose;
|
||||
bool showMonthlySold;
|
||||
List<ImageUrl> slideImages;
|
||||
List<Product> promoProducts;
|
||||
String paypalEmail;
|
||||
bool deliveryCanadaPost;
|
||||
bool deliveryStoreDelivery;
|
||||
bool deliveryPickup;
|
||||
String currency;
|
||||
List<WaitingLine> waitingLine;
|
||||
bool enableWaitingLine;
|
||||
double pointsToCreditsConversionRate;
|
||||
String chaseXLogin;
|
||||
String chaseTransactionKey;
|
||||
String chaseResponseKey;
|
||||
DistanceInfo distanceInfo;
|
||||
int commentsCount;
|
||||
bool forceClose;
|
||||
bool isPublic;
|
||||
double referrerCoupon;
|
||||
bool instanceDelivery;
|
||||
List<QuickInput> quickInputs;
|
||||
int? id;
|
||||
String? name;
|
||||
String? phone;
|
||||
Address? address;
|
||||
String? fullAddress;
|
||||
String? picUrl;
|
||||
int? status;
|
||||
List<BusinessTime>? openingTime;
|
||||
double? shippingFee;
|
||||
double? packageFee;
|
||||
double? minPrice;
|
||||
int? shippingTime;
|
||||
int? monthSales;
|
||||
String? bulletin;
|
||||
int? category;
|
||||
bool? isLike;
|
||||
String? description;
|
||||
String? policy;
|
||||
String? bannerImageUrl;
|
||||
int? todayOpen;
|
||||
int? todayClose;
|
||||
bool? showMonthlySold;
|
||||
List<ImageUrl>? slideImages;
|
||||
List<Product>? promoProducts;
|
||||
String? paypalEmail;
|
||||
bool? deliveryCanadaPost;
|
||||
bool? deliveryStoreDelivery;
|
||||
bool? deliveryPickup;
|
||||
String? currency;
|
||||
List<WaitingLine>? waitingLine;
|
||||
bool? enableWaitingLine;
|
||||
double? pointsToCreditsConversionRate;
|
||||
String? chaseXLogin;
|
||||
String? chaseTransactionKey;
|
||||
String? chaseResponseKey;
|
||||
DistanceInfo? distanceInfo;
|
||||
int? commentsCount;
|
||||
bool? forceClose;
|
||||
bool? isPublic;
|
||||
double? referrerCoupon;
|
||||
bool? instanceDelivery;
|
||||
List<QuickInput>? quickInputs;
|
||||
|
||||
Business.fromJson(Map<String, dynamic> json)
|
||||
: id = json['id'],
|
||||
|
||||
Reference in New Issue
Block a user