- 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.
27 lines
559 B
Dart
27 lines
559 B
Dart
|
|
import 'dart:convert';
|
|
|
|
class BookingTime {
|
|
String? viewTime;
|
|
int? unixTime;
|
|
String? sendTimeTip;
|
|
|
|
BookingTime(this.viewTime, this.unixTime, this.sendTimeTip);
|
|
|
|
BookingTime.fromJson(Map<String, dynamic> json)
|
|
: viewTime = json['view_time'],
|
|
unixTime = int.parse(json['unix_time'].toString()),
|
|
sendTimeTip = json['send_time_tip'];
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'view_time': viewTime,
|
|
'unix_time': unixTime,
|
|
'send_time_tip': sendTimeTip,
|
|
};
|
|
|
|
@override
|
|
String toString() {
|
|
return json.encode(this);
|
|
}
|
|
|
|
} |