factory BucketList.fromMap(Map<String, dynamic> map) { return BucketList( total: map['total'], buckets: List<Bucket>.from(map['buckets'].map((p) => Bucket.fromMap(p))), ); }