- 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.
29 lines
652 B
Dart
29 lines
652 B
Dart
import 'dart:convert';
|
|
|
|
class WaitingLineItem {
|
|
String? deviceId;
|
|
String? phone;
|
|
String? createdAt;
|
|
int? peopleCount;
|
|
int? waitingNumber;
|
|
|
|
WaitingLineItem.fromJson(Map<String, dynamic> json)
|
|
: deviceId = json['device_id'],
|
|
phone = json['phone'],
|
|
createdAt = json['created_at'],
|
|
peopleCount = json['people_count'],
|
|
waitingNumber = json['waiting_number'];
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'device_id': deviceId,
|
|
'phone': phone,
|
|
'created_at': createdAt,
|
|
'people_count': peopleCount,
|
|
'waiting_number': waitingNumber
|
|
};
|
|
|
|
@override
|
|
String toString() {
|
|
return json.encode(this);
|
|
}
|
|
} |