SafeAreaInsets.fromJson constructor

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

Implementation

factory SafeAreaInsets.fromJson(Map<String, dynamic> json) {
  return SafeAreaInsets(
    top: json.containsKey('top') ? json['top'] as int : null,
    topMax: json.containsKey('topMax') ? json['topMax'] as int : null,
    left: json.containsKey('left') ? json['left'] as int : null,
    leftMax: json.containsKey('leftMax') ? json['leftMax'] as int : null,
    bottom: json.containsKey('bottom') ? json['bottom'] as int : null,
    bottomMax: json.containsKey('bottomMax')
        ? json['bottomMax'] as int
        : null,
    right: json.containsKey('right') ? json['right'] as int : null,
    rightMax: json.containsKey('rightMax') ? json['rightMax'] as int : null,
  );
}