Input$VoteGroupInput.fromJson constructor

Input$VoteGroupInput.fromJson(
  1. Map<String, dynamic> data
)

Implementation

factory Input$VoteGroupInput.fromJson(Map<String, dynamic> data) {
  final result$data = <String, dynamic>{};
  if (data.containsKey('id')) {
    final l$id = data['id'];
    result$data['id'] = (l$id as String?);
  }
  final l$name = data['name'];
  result$data['name'] = (l$name as String);
  if (data.containsKey('description')) {
    final l$description = data['description'];
    result$data['description'] = (l$description as String?);
  }
  final l$matchLabel = data['matchLabel'];
  result$data['matchLabel'] =
      (l$matchLabel as List<dynamic>).map((e) => (e as String)).toList();
  final l$order = data['order'];
  result$data['order'] = (l$order as int);
  final l$items = data['items'];
  result$data['items'] = (l$items as List<dynamic>)
      .map((e) => Input$VoteItemInput.fromJson((e as Map<String, dynamic>)))
      .toList();
  return Input$VoteGroupInput._(result$data);
}