FluentCell.fromJson constructor

FluentCell.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory FluentCell.fromJson(Map<String, dynamic> json) {
  final cell = FluentCell(
    children: (json['children'] as List<dynamic>?)
        ?.map((e) => const FNodeJsonConverter().fromJson(e as Map<String, dynamic>))
        .toList(),
  );
  cell.id = json['id'] as String? ?? cell.id;
  cell.colSpan = (json['colSpan'] as num?)?.toInt() ?? 1;
  cell.rowSpan = (json['rowSpan'] as num?)?.toInt() ?? 1;
  return cell;
}