- 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.
30 lines
634 B
Dart
30 lines
634 B
Dart
|
|
import 'dart:convert';
|
|
|
|
class Fulfillment {
|
|
int? id;
|
|
String? shippingMethod;
|
|
String? trackingNumber;
|
|
String? note;
|
|
String? createdAt;
|
|
|
|
Fulfillment.fromJson(Map<String, dynamic> json) :
|
|
id = json['id'],
|
|
shippingMethod = json['shipping_method'],
|
|
trackingNumber = json['tracking_number'],
|
|
note = json['note'],
|
|
createdAt = json['created_at'];
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'id': id,
|
|
'shipping_method': shippingMethod,
|
|
'tracking_number': trackingNumber,
|
|
'note': note,
|
|
'created_at': createdAt,
|
|
};
|
|
|
|
@override
|
|
String toString() {
|
|
return json.encode(this);
|
|
}
|
|
} |