toMap method

Map<String, dynamic>? toMap()
inherited

Implementation

Map<String, dynamic>? toMap() {
  final c = config?.toMap();
  final x = {
    if (name.isNotEmpty) "name": name,
    if (c != null && c.isNotEmpty) "config": c,
  };
  if (x.isEmpty) return null;
  return x;
}