FluentTable.fromJson constructor

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

Implementation

factory FluentTable.fromJson(Map<String, dynamic> json) {
  final table = _$FluentTableFromJson(json);
  table.id = json['id'] as String? ?? table.id;
  final rawWidths = json['columnWidths'];
  if (rawWidths is List) {
    table.columnWidths = rawWidths.map((e) => (e as num).toDouble()).toList();
  }
  table.tableWidth = (json['tableWidth'] as num?)?.toDouble();
  return table;
}