mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-25 03:26:22 +08:00
29 lines
541 B
Dart
29 lines
541 B
Dart
class PbpData {
|
|
int? stepSec;
|
|
Events? events;
|
|
|
|
PbpData({
|
|
this.stepSec,
|
|
this.events,
|
|
});
|
|
|
|
factory PbpData.fromJson(Map<String, dynamic> json) => PbpData(
|
|
stepSec: json["step_sec"],
|
|
events: json["events"] == null ? null : Events.fromJson(json["events"]),
|
|
);
|
|
}
|
|
|
|
class Events {
|
|
List<double>? eDefault;
|
|
|
|
Events({
|
|
this.eDefault,
|
|
});
|
|
|
|
factory Events.fromJson(Map<String, dynamic> json) => Events(
|
|
eDefault: (json["default"] as List?)
|
|
?.map((e) => (e as num).toDouble())
|
|
.toList(),
|
|
);
|
|
}
|