livePreviewQuery method

void livePreviewQuery(
  1. Map<String, dynamic> livePreviewQuery
)

Implementation

void livePreviewQuery(Map<String, dynamic> livePreviewQuery) {
  if (livePreview.containsKey('enable')) {
    final bool enable = livePreview['enable'] as bool;
    if (enable) {
      if (livePreviewQuery.containsKey('live_preview') &&
          livePreviewQuery['live_preview'] != null) {
        livePreview['live_preview'] = livePreviewQuery['live_preview'];
      } else {
        livePreview['live_preview'] = 'init';
      }
      if (livePreviewQuery.containsKey('content_type_uid') &&
          livePreviewQuery['content_type_uid'] != null) {
        livePreview['content_type_uid'] =
            livePreviewQuery['content_type_uid'];
      }
    }
  }
}