fromMap static method

PageBlockTable? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static PageBlockTable? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var caption = RichText.fromMap(_map['caption'])!;
  var cells = List<List<PageBlockTableCell>>.from(
    (_map["cells"] ?? []).map(
      (e) => List<PageBlockTableCell>.from(
        (e ?? []).map(
          (e) => PageBlockTableCell.fromMap(e),
        ),
      ),
    ),
  );
  var is_bordered = _map['is_bordered']! as bool;
  var is_striped = _map['is_striped']! as bool;
  return PageBlockTable(
    extra: extra,
    clientId: clientId,
    caption: caption,
    cells: cells,
    is_bordered: is_bordered,
    is_striped: is_striped,
  );
}