backup. before shop update
This commit is contained in:
21
lib/models/text_value.dart
Normal file
21
lib/models/text_value.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user