- 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.
21 lines
374 B
Dart
21 lines
374 B
Dart
|
|
import 'dart:convert';
|
|
|
|
class UserPosition {
|
|
double? lat;
|
|
double? lng;
|
|
|
|
UserPosition.fromJson(Map<String, dynamic> json) :
|
|
lat = double.parse(json['lat'].toString()),
|
|
lng = double.parse(json['lng'].toString());
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'lat': lat,
|
|
'lng': lng
|
|
};
|
|
|
|
@override
|
|
String toString() {
|
|
return json.encode(this);
|
|
}
|
|
} |