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() => {
'absoluteSlot': absoluteSlot,
'blockHeight': blockHeight,
'epoch': epoch,
'slotIndex': slotIndex,
'slotsInEpoch': slotsInEpoch,
'transactionCount': transactionCount,
};