Theme.fromMap constructor

Theme.fromMap(
  1. Map<String, dynamic> data
)

Implementation

factory Theme.fromMap(Map<String, dynamic> data) => Theme(
      pages: (data['pages'] as List<dynamic>?)
          ?.map((e) => Page.fromMap(e as Map<String, dynamic>))
          .toList(),
      selectedLocales: (data['selected_locales'] as List<dynamic>?)
          ?.map((e) => Locale.fromMap(e as Map<String, dynamic>))
          .toList(),
      themeId: data['theme_id'] as String?,
      name: data['name'] as String?,
      selectedPageId: data['selected_page_id'] as String?,
      colors: data['colors'] == null
          ? null
          : Colors.fromMap(data['colors'] as Map<String, dynamic>),
    );