MediaQuery.fromJson constructor

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

Implementation

factory MediaQuery.fromJson(Map<String, dynamic> json) {
  return MediaQuery(
    expressions: (json['expressions'] as List)
        .map((e) => MediaQueryExpression.fromJson(e as Map<String, dynamic>))
        .toList(),
    active: json['active'] as bool? ?? false,
  );
}