1
0
mirror of https://github.com/stonega/tsacdop synced 2025-01-10 14:23:08 +01:00
tsacdop-podcast-app-android/lib/webfeed/domain/media/price.dart
2020-02-09 20:29:09 +08:00

25 lines
499 B
Dart

import 'package:xml/xml.dart';
class Price {
final double price;
final String type;
final String info;
final String currency;
Price({
this.price,
this.type,
this.info,
this.currency,
});
factory Price.parse(XmlElement element) {
return new Price(
price: double.tryParse(element.getAttribute("price") ?? "0"),
type: element.getAttribute("type"),
info: element.getAttribute("info"),
currency: element.getAttribute("currency"),
);
}
}