toMap method

dynamic toMap()

Convert the icon data to DynamicMap.

Implementation

DynamicMap toMap() {
  if (this == null) {
    return <String, dynamic>{};
  }
  return <String, dynamic>{
    "code": this!.codePoint,
    if (this!.fontFamily.isNotEmpty) "family": this!.fontFamily,
    if (this!.fontPackage.isNotEmpty) "package": this!.fontPackage,
  };
}