toJson method
For use with a JsonEncoder to generate this Asset's Contents.json file.
Implementation
Map<String, dynamic> toJson() {
final imagesMap = <Map<String, dynamic>>[];
imagesMap.addAll(images.map((e) => e.toJson()));
if (darkImages != null) {
imagesMap.addAll(darkImages!.map((e) => e.toJson()));
}
if (tintedImages != null) {
imagesMap.addAll(tintedImages!.map((e) => e.toJson()));
}
return <String, dynamic>{
'images': imagesMap,
'info': {
'author': 'icons_launcher',
'version': 1,
}
};
}