Files
flutter_wisetronic/lib/models/text_value.dart
peima 4f9aa4f683 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.
2026-07-24 03:48:54 +08:00

21 lines
354 B
Dart

import 'dart:convert';
class TextValue {
String? text;
int? value;
TextValue.fromJson(Map<String, dynamic> json)
: text = json['text'],
value = int.parse(json['value'].toString());
Map<String, dynamic> toJson() => {
'text': text,
'value': value
};
@override
String toString() {
return json.encode(this);
}
}