Component.fromMap constructor
Component.fromMap(
- Map<String, dynamic> data
)
Implementation
factory Component.fromMap(Map<String, dynamic> data) => Component(
name: data['name'] as String?,
componentId: data['component_id'] as String?,
key: data['key'] as String?,
hasNavigation: data['has_navigation'] as bool?,
attributes: (data['attributes'] as List<dynamic>?)
?.map((e) => Attribute.fromMap(e as Map<String, dynamic>))
.toList(),
children: (data['children'] as List<dynamic>?)
?.map((e) => Component.fromMap(e as Map<String, dynamic>))
.toList(),
);