toJson method
Implementation
Map<String, dynamic> toJson({bool short = false}) {
Map<String, dynamic> params = {
'page': page.toString(),
'entries': entries.toString(),
};
if ((search ?? '').isNotEmpty) {
params['search'] = search;
}
if ((include ?? '').isNotEmpty && !short) {
params['include'] = include;
}
if ((exclude ?? '').isNotEmpty && !short) {
params['exclude'] = exclude;
}
if ((platform ?? '').isNotEmpty) {
params['platform'] = platform;
}
if ((chains ?? '').isNotEmpty) {
params['chains'] = chains;
}
return params;
}