toJson method
Serialises this
class into a JSON object.
class Item extends Serializable {
const(this.name, this.count);
final String name;
final int? count;
}
final Item x = Item('apple', 10);
print(x.toJson()); // { 'name': 'apple', 'count': 10 }
Implementation
@override
Map<String, dynamic> toJson() => {
'slotsPerEpoch': slotsPerEpoch,
'leaderScheduleSlotOffset': leaderScheduleSlotOffset,
'warmup': warmup,
'firstNormalEpoch': firstNormalEpoch,
'firstNormalSlot': firstNormalSlot,
};