Pose.fromMap constructor
Implementation
factory Pose.fromMap(Map<String, dynamic> map) {
/// gets double values from Float list
List<double> fromFloats(v) =>
(v as List<Float>).map((f) => f.value).toList();
return Pose(
head: map.containsKey('Head') ? fromFloats(map['Head']) : [],
body: map.containsKey('Body') ? fromFloats(map['Body']) : [],
lleg: map.containsKey('LeftLeg') ? fromFloats(map['LeftLeg']) : [],
rleg: map.containsKey('RightLeg') ? fromFloats(map['RightLeg']) : [],
larm: map.containsKey('LeftArm') ? fromFloats(map['LeftArm']) : [],
rarm: map.containsKey('RightArm') ? fromFloats(map['RightArm']) : [],
);
}