Info.fromJson constructor

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

Converts this Info object to a JSON map.

Implementation

factory Info.fromJson(Map<String, dynamic> json) {
  final extensions = Map.fromEntries(
    json.entries.where((e) => e.key.startsWith('x-')),
  );
  return _$InfoFromJson(json).copyWith(extensions: extensions);
}